fix: allow agent-reported final states, add SSE reconnection by mafredri · Pull Request #22286 · coder/coder
mafredri
changed the title
fix(cli/exp_mcp): trust terminal states from agent, add SSE reconnection
fix(cli/exp_mcp): allow agent-reported final states, add SSE reconnection
mafredri
changed the title
fix(cli/exp_mcp): allow agent-reported final states, add SSE reconnection
fix(cli): allow agent-reported final states, add SSE reconnection
mafredri
changed the title
fix(cli): allow agent-reported final states, add SSE reconnection
fix: allow agent-reported final states, add SSE reconnection
…tion Previously WithTaskReporter unconditionally overrode all self-reported states to "working" when AgentAPI was enabled. This blocked final states (failure, complete) that only the agent can produce, since the screen watcher cannot detect them. Now only idle is overridden to working; failure, complete, and working pass through as-is. Also remove a misplaced unconditional log line that printed "Failed to watch screen events" on every startup, and add SSE reconnection with exponential backoff in startWatcher so it recovers from dropped connections.
mafredri
deleted the
fix/task-state-reporting
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters