Mathias Fredriksson
947b390c5a
fix: allow agent-reported final states, add SSE reconnection ( #22286 )
...
When AgentAPI is configured, `WithTaskReporter` unconditionally
overrides all self-reported states to `working`. The intent was to
distrust the agent's `idle` and rely on the screen watcher, but the
override also blocks `failure` and `complete`, which only the agent can
produce (the screen watcher only knows `running`/`stable`). Tasks get
stuck as `working` or `null` forever.
Now only `idle` is overridden to `working`; `failure`, `complete`, and
`working` pass through as-is.
Also:
- Remove misplaced unconditional `"Failed to watch screen events"` log
that fired on every startup
- Add SSE reconnection with exponential backoff (1s-30s) in
`startWatcher` so it recovers from dropped connections instead of dying
silently
- Add `complete` to the `coder_report_task` tool enum, which the
`coder/claude-code` registry module already instructs agents to use but
was missing from the schema
Refs coder/internal#1350
2026-02-24 20:28:50 +02:00
..
2026-01-08 15:24:11 +04:00
2026-02-02 15:50:09 +02:00
2026-02-03 14:10:49 -06:00
2025-06-24 11:16:31 +02:00
2024-02-26 10:03:49 -06:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-12-15 09:40:59 -07:00
2023-09-04 21:42:45 +03:00
2026-02-23 08:30:32 -08:00
2025-06-20 13:16:55 -06:00
2025-11-05 14:22:24 +02:00
2026-02-05 12:32:07 -06:00
2025-10-27 17:07:25 +01:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2024-08-22 15:40:53 +10:00
2025-09-29 17:01:54 +04:00
2025-06-06 16:44:25 +04:00
2025-07-03 11:28:00 -06:00
2025-06-06 16:44:25 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-03 14:10:49 -06:00
2026-02-03 14:10:49 -06:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2026-02-24 20:28:50 +02:00
2026-02-24 20:28:50 +02:00
2026-01-29 14:40:02 +01:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2026-02-02 16:16:16 +02:00
2026-01-08 15:24:11 +04:00
2026-02-02 16:16:16 +02:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-03 14:10:49 -06:00
2025-03-26 01:56:39 -05:00
2025-09-03 10:49:19 +04:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-09-03 10:38:42 +04:00
2025-09-03 10:49:19 +04:00
2026-01-28 14:01:07 +02:00
2025-09-03 10:49:19 +04:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2025-12-15 09:40:59 -07:00
2026-02-23 08:30:32 -08:00
2025-12-03 11:32:59 +02:00
2026-01-29 16:06:17 +01:00
2026-01-29 16:06:17 +01:00
2025-05-12 11:45:24 -07:00
2025-10-30 17:41:08 -06:00
2026-01-08 15:24:11 +04:00
2026-02-03 09:45:23 +00:00
2024-06-13 10:19:36 +04:00
2025-09-22 17:14:07 +04:00
2025-09-11 15:08:57 +02:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-12-22 11:28:31 +00:00
2026-01-07 16:06:00 +00:00
2026-02-06 14:09:39 +11:00
2026-02-06 14:09:39 +11:00
2026-02-05 19:35:20 +11:00
2026-02-06 14:09:39 +11:00
2025-09-22 17:14:07 +04:00
2024-08-20 14:47:46 +10:00
2025-12-03 11:32:59 +02:00
2024-05-23 07:54:59 -10:00
2025-12-22 11:24:00 +11:00
2026-01-14 09:47:50 -08:00
2023-08-09 13:00:25 +02:00
2025-07-28 14:46:04 +01:00
2026-02-24 09:15:02 +01:00
2025-07-03 13:22:54 +10:00
2025-02-24 05:38:17 +00:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-06-27 14:42:22 +04:00
2026-01-08 15:24:11 +04:00
2025-10-06 08:56:43 +00:00
2025-12-03 11:32:59 +02:00
2025-12-11 18:19:18 +00:00
2025-12-03 11:32:59 +02:00
2023-08-18 18:55:43 +00:00
2026-01-08 15:24:11 +04:00
2025-03-26 01:56:39 -05:00
2024-07-30 10:44:02 -06:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2024-11-04 17:23:31 +01:00
2026-01-08 15:24:11 +04:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2025-06-20 13:16:55 -06:00
2026-01-12 17:46:05 +00:00
2026-02-16 12:16:08 +11:00
2025-06-20 13:16:55 -06:00
2025-10-24 10:18:19 +00:00
2025-12-03 11:32:59 +02:00
2024-11-04 17:23:31 +01:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-10-23 14:24:54 +02:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2026-02-20 10:33:37 -06:00
2026-02-20 09:11:01 -06:00
2026-02-23 08:30:32 -08:00
2026-01-08 15:24:11 +04:00
2026-01-16 15:45:33 +00:00
2026-01-16 15:45:33 +00:00
2024-03-15 13:16:36 +00:00
2024-03-15 13:16:36 +00:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2026-02-09 09:56:33 +00:00
2023-07-20 12:05:39 +02:00
2026-02-09 09:56:33 +00:00
2023-07-20 12:05:39 +02:00
2026-02-09 09:56:33 +00:00
2026-01-30 13:24:06 +11:00
2026-02-03 14:10:49 -06:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2026-02-23 22:46:17 -06:00
2026-01-12 15:16:59 +01:00
2025-09-22 17:14:07 +04:00
2026-01-20 10:28:52 +11:00
2026-01-20 10:28:52 +11:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-20 16:27:32 +04:00
2026-01-08 15:24:11 +04:00
2025-11-28 08:33:50 +02:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-12-03 11:32:59 +02:00
2026-02-13 14:21:31 +00:00
2026-02-02 15:50:09 +02:00
2026-02-13 14:21:31 +00:00
2026-02-13 14:21:31 +00:00
2026-02-17 16:24:13 +00:00
2026-02-17 16:24:13 +00:00
2026-02-13 14:21:31 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-02-17 16:24:13 +00:00
2026-02-17 16:24:13 +00:00
2024-07-25 16:07:53 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2023-08-18 18:55:43 +00:00
2024-03-17 09:45:26 -05:00
2024-07-25 16:07:53 -05:00
2025-12-03 11:32:59 +02:00
2025-12-15 11:26:41 -06:00
2025-12-03 11:32:59 +02:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2025-12-15 11:26:41 -06:00
2025-10-03 10:20:06 -05:00
2025-07-24 16:44:36 +01:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2026-02-19 09:31:12 +11:00
2026-02-19 09:31:12 +11:00
2026-02-17 13:16:46 +00:00
2026-02-24 15:27:03 +00:00
2026-02-24 09:15:02 +01:00
2025-09-22 17:14:07 +04:00
2024-08-23 21:23:51 +00:00
2025-04-16 10:37:09 -06:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-04-15 18:30:20 -04:00
2025-09-22 17:14:07 +04:00
2025-05-12 11:45:24 -07:00
2025-12-03 11:32:59 +02:00
2025-04-15 18:30:20 -04:00
2023-10-10 11:14:20 +01:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2024-11-18 21:10:01 +10:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2024-07-09 13:23:11 -05:00
2025-09-26 11:20:25 +01:00