-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Parent: #1534
Problem
Dev Proxy watches devproxyrc.json for changes and auto-restarts when the config file is modified. This is convenient for human developers but is a hazard for AI agents that modify configuration files programmatically.
An agent that:
- Starts Dev Proxy
- Modifies
devproxyrc.jsonto change plugin settings - Continues testing
...will trigger an unexpected proxy restart in step 2. The agent doesn't know the restart is happening, the proxy is temporarily unavailable, and in-flight requests may be lost.
There's no flag to disable this behavior.
Rationale
Agents need predictable behavior. An agent-driven workflow might involve modifying config between test runs or dynamically adjusting proxy settings. The auto-restart feature, while helpful for humans iterating in a terminal, creates a race condition for automated callers.
Proposed solution
-
Add a
--no-watchflag (or--watch false) to the root command that disables config file watching:--no-watch Disable automatic restart on configuration file changes -
When
--no-watchis set, config changes require a manual restart (which is what agents expect — explicit control). -
Document this behavior in root
--help— agents need to know about auto-restart even if they don't use--no-watch, so they can plan around it.
Affected code
DevProxy/Commands/DevProxyCommand.cs— add--no-watchoptionDevProxy/Proxy/ConfigFileWatcher.cs(or equivalent) — respect the flagDevProxy/Program.cs— pass flag through restart loop