alishobeiri-oai
8531184b49
Make agent-message wakes respect interrupts and Plan mode ( #56330 )
...
## Why
A pending agent-message wake can outlive an interrupt or a switch to Plan mode while model discovery is waiting. It must recheck whether it can start before consuming queued messages.
## What changed
- Revalidate reserved wakes after discovery and build the turn with the configuration selected during admission.
- Mark interrupted wake reservations as stopped so later agent messages cannot restart automatic work, while preserving queued messages for explicit turns.
- Keep finishing turns marked as running until completion is persisted, protecting their rollout writer from capacity eviction.
## Testing
Add regression tests for interrupts and Plan-mode changes during discovery, queued-message preservation, explicit follow-ups with `wake_on_agent_messages` disabled, and completion status and persistence with the feature enabled and disabled.
GitOrigin-RevId: afe1d57063a5ec491e8b16d6c62135caa69c0a3c
2026-10-23 02:21:49 +00:00
..
2026-10-21 19:22:57 +00:00
2026-10-23 00:46:28 +00:00
2026-10-19 20:30:44 +00:00
2026-10-06 01:39:50 +00:00
2026-10-15 20:57:39 +00:00
2026-09-11 22:55:38 +00:00
2026-10-21 19:34:51 +00:00
2026-09-24 20:59:51 +00:00
2026-10-23 00:02:29 +00:00
2026-10-20 19:39:43 +00:00
2026-10-23 02:21:49 +00:00
2026-10-06 21:28:13 +00:00
2026-10-06 01:39:50 +00:00
2026-10-06 17:11:07 +00:00
2026-10-03 18:15:13 +00:00
2026-10-03 18:15:13 +00:00
2026-10-06 22:39:32 +00:00
2026-10-15 12:01:04 +00:00
2026-10-21 01:30:29 +00:00
2026-09-23 00:47:07 +00:00
2026-10-06 19:30:57 +00:00
2026-10-14 05:36:44 +00:00
2026-09-29 19:03:30 +00:00
2026-10-07 18:32:50 +00:00
2026-09-15 18:23:08 +00:00
2026-10-23 00:40:04 +00:00
2026-10-05 18:52:51 +00:00
2026-10-10 01:25:00 +00:00
2026-10-22 23:30:35 +00:00
2026-10-22 02:15:00 +00:00
2026-10-20 17:15:35 +00:00
2026-10-16 16:28:53 +00:00
2026-09-21 22:49:17 +00:00
2026-10-22 17:49:53 +00:00
2026-09-14 15:06:28 +00:00
2026-08-25 23:42:50 +00:00
2026-10-06 17:11:07 +00:00
2026-09-19 00:46:06 +00:00
2026-10-13 16:57:54 +00:00
2026-10-06 01:39:50 +00:00
2026-10-22 21:01:14 +00:00
2026-10-19 19:24:26 +00:00
2026-10-21 21:23:01 +00:00
2026-10-17 04:02:21 +00:00
2026-10-08 16:27:10 +00:00
2026-10-06 16:56:39 +00:00
2026-10-08 16:19:09 +00:00
2026-10-09 18:58:53 +00:00
2026-10-08 16:19:09 +00:00
2026-10-08 23:34:16 +00:00
2026-10-13 10:21:42 +00:00
2026-10-23 00:02:29 +00:00
2026-09-19 01:21:32 +00:00
2026-10-23 00:02:29 +00:00
2026-10-15 19:51:22 +00:00
2026-10-01 15:57:03 +00:00
2026-10-21 02:41:05 +00:00
2026-09-18 22:42:46 +00:00
2026-10-22 23:30:35 +00:00
2026-10-06 16:56:39 +00:00
2026-10-21 02:41:05 +00:00
2026-10-21 02:41:05 +00:00
2026-10-19 18:49:48 +00:00
2026-10-06 01:39:50 +00:00
2026-10-08 20:04:38 +00:00
2026-10-13 15:05:16 +00:00
2026-10-09 20:14:04 +00:00
2026-10-07 13:05:06 +00:00
2026-10-05 22:17:02 +00:00
2026-10-19 22:01:41 +00:00
2026-10-20 14:43:08 +00:00
2026-10-13 23:29:53 +00:00
2026-10-07 15:47:21 +00:00
2026-10-14 02:01:49 +00:00
2026-10-19 22:03:06 +00:00
2026-10-06 17:11:07 +00:00
2026-10-23 00:02:29 +00:00
2026-10-21 02:41:05 +00:00
2026-10-15 11:24:07 +00:00
2026-10-16 12:37:14 +00:00
2026-10-21 02:41:05 +00:00
2026-09-29 16:53:11 +00:00
2026-10-23 00:09:23 +00:00
2026-10-19 11:40:15 +00:00
2026-10-08 18:42:58 +00:00
2026-10-22 17:48:34 +00:00
2026-10-10 01:25:00 +00:00
2026-09-08 20:37:30 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-10-21 16:43:30 +00:00
2026-10-06 16:56:39 +00:00
2026-10-22 22:33:07 +00:00
2026-09-29 13:08:37 +00:00
2026-10-08 21:01:06 +00:00
2026-10-06 01:39:50 +00:00
2026-10-14 20:00:52 +00:00
2026-09-29 13:08:37 +00:00
2026-10-01 18:05:05 +00:00
2026-10-13 16:23:44 +00:00
2026-10-23 00:02:29 +00:00
2026-10-21 02:41:05 +00:00
2026-10-07 07:57:14 +00:00
2026-10-19 11:40:15 +00:00
2026-10-23 00:02:29 +00:00
2026-10-06 19:30:57 +00:00
2026-10-06 01:39:50 +00:00
2026-10-23 02:21:49 +00:00
2026-10-08 16:19:09 +00:00
2026-09-23 22:10:04 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-10-17 23:22:14 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-08-29 03:28:19 +00:00
2026-09-30 11:59:13 +00:00
2026-10-06 00:16:18 +00:00
2026-09-23 21:34:11 +00:00
2026-10-09 18:58:53 +00:00
2026-09-22 21:57:52 +00:00
2026-10-23 00:02:29 +00:00
2026-10-06 17:10:43 +00:00
2026-09-24 20:28:31 +00:00
2026-10-10 01:25:00 +00:00
2026-10-06 17:11:07 +00:00
2026-10-13 12:42:53 +00:00
2026-10-22 10:03:05 +00:00
2026-10-23 00:40:04 +00:00
2026-10-06 17:11:07 +00:00
2026-10-20 20:27:32 +00:00
2026-10-20 14:14:59 +00:00
2026-10-06 17:11:07 +00:00
2026-10-10 01:25:00 +00:00
2026-09-15 04:20:38 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-22 12:46:24 +00:00
2026-10-21 02:41:05 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 17:02:20 +00:00
2026-10-06 17:11:07 +00:00
2026-10-23 00:02:29 +00:00
2026-10-21 18:43:15 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-09-29 13:08:37 +00:00
2026-10-08 02:06:58 +00:00
2026-10-13 13:36:24 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 20:01:37 +00:00
2026-09-10 03:18:28 +00:00
2026-10-06 22:39:06 +00:00
2026-10-14 18:02:25 +00:00
2026-10-06 18:17:48 +00:00
2026-10-10 01:25:00 +00:00
2026-10-23 00:02:29 +00:00
2026-09-11 21:32:04 +00:00
2026-09-30 11:59:13 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 20:30:44 +00:00
2026-10-09 13:15:39 +00:00
2026-10-22 10:03:05 +00:00
2026-10-05 16:58:29 +00:00
2026-10-03 04:24:52 +00:00
2026-09-29 01:14:41 +00:00
2026-10-23 00:46:28 +00:00
2026-10-22 23:48:20 +00:00
2026-10-20 17:01:52 +00:00
2026-10-05 22:17:02 +00:00
2026-09-29 13:08:37 +00:00
2026-10-06 19:30:57 +00:00
2026-10-01 16:14:27 +00:00
2026-10-07 19:42:35 +00:00
2026-10-13 18:08:10 +00:00
2026-10-07 15:47:21 +00:00
2026-10-08 22:01:24 +00:00
2026-10-20 22:34:40 +00:00
2026-10-08 03:20:54 +00:00
2026-10-21 19:29:08 +00:00
2026-10-22 02:15:00 +00:00
2026-10-03 06:42:48 +00:00
2026-10-22 22:44:48 +00:00
2026-09-22 21:57:52 +00:00
2026-10-20 11:56:17 +00:00
2026-09-22 05:53:29 +00:00
2026-10-02 23:26:27 +00:00
2026-09-16 22:25:54 +00:00
2026-10-12 18:54:22 +00:00
2026-10-06 01:39:50 +00:00
2026-10-19 17:37:49 +00:00
2026-10-03 18:15:13 +00:00
2026-10-06 01:39:50 +00:00
2026-10-23 00:46:28 +00:00
2026-10-06 17:10:43 +00:00
2026-10-11 15:48:35 +00:00
2026-10-23 00:40:04 +00:00
2026-10-23 00:02:29 +00:00
2026-10-19 17:02:20 +00:00
2026-10-10 01:25:00 +00:00
2026-10-01 00:57:53 +00:00
2026-09-22 11:10:29 +00:00
2026-10-21 19:53:00 +00:00
2026-10-19 19:33:11 +00:00
2026-10-06 22:39:06 +00:00
2026-09-09 17:56:33 +00:00
2026-10-19 20:01:37 +00:00
2026-10-02 23:26:27 +00:00
2026-10-02 23:26:27 +00:00
2026-10-06 01:39:50 +00:00
2026-10-20 17:15:35 +00:00
2026-08-28 09:48:13 +00:00
2026-10-19 11:40:15 +00:00
2026-09-02 22:45:19 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:10:43 +00:00
2026-09-23 20:49:48 +00:00
2026-10-21 22:48:29 +00:00
2026-10-20 22:34:40 +00:00
2026-10-20 21:28:45 +00:00
2026-10-06 17:11:07 +00:00
2026-09-29 02:40:51 +00:00
2026-10-14 06:03:02 +00:00
2026-10-06 16:56:39 +00:00
2026-09-04 20:38:08 +00:00
2026-10-08 16:19:09 +00:00
2026-09-28 15:58:17 +00:00
2026-10-22 01:54:51 +00:00
2026-10-14 23:02:21 +00:00
2026-08-28 15:44:48 +00:00
2026-10-23 00:02:29 +00:00
2026-10-01 15:57:03 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 22:39:32 +00:00
2026-10-06 17:26:19 +00:00
2026-09-22 06:24:49 +00:00
2026-09-24 20:28:31 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 19:24:26 +00:00
2026-10-23 00:02:29 +00:00