Hermes Agent
219cb714a1
fix(gateway): persist api_server async-delegation completions as deliveries, not user-turn wakes
...
On the stateless api_server platform, a background delegate_task
completion was delivered by self-POSTing /v1/chat/completions with
role=user after the parent turn had already completed (event.complete,
finish_reason=stop). That starts an unauthorized new agent turn the
client never sent, persists the completion as an ordinary role=user row
(display_kind NULL), and can blow through a pending human-confirmation
gate — the exact skip-ahead reported in #85957 .
Fix: async_delegation completions targeting a non-push api_server
session are now written into the session transcript as a durable
DELIVERY row (role=user + display_kind=async_delegation_complete +
display metadata — the same bookkeeping shape the TUI/desktop delivery
path persists). No agent turn runs; clients polling
GET /api/sessions/{id}/messages see the result immediately, and the
next real client turn carries it as context. Persist failures return
False so the durable claim is released and the completion retried.
Watch-pattern notifications keep the existing self-post wake behavior;
push-capable adapters are untouched.
Fixes #85957
2026-09-01 10:11:07 -07:00
..
2026-08-23 17:45:47 -05:00
2026-09-01 08:30:26 -07:00
2026-08-31 10:00:55 -07:00
2026-08-31 10:09:42 -07:00
2026-08-26 00:54:36 -07:00
2026-08-24 15:54:23 +05:30
2026-09-01 08:31:37 -07:00
2026-08-26 07:28:10 -07:00
2026-08-24 21:21:34 -07:00
2026-08-31 01:04:11 -07:00
2026-09-01 10:11:07 -07:00
2026-09-01 10:06:06 -07:00
2026-09-01 20:55:35 +05:30
2026-08-04 17:36:26 -04:00
2026-09-01 14:11:55 +05:30
2026-08-28 11:54:33 +05:30
2026-09-01 14:11:55 +05:30
2026-08-29 18:01:25 -07:00
2026-08-20 19:56:01 -07:00
2026-09-01 09:28:31 -07:00
2026-09-01 01:00:23 -07:00
2026-08-30 04:53:39 -07:00
2026-08-31 12:08:30 -07:00
2026-09-01 09:27:00 -07:00
2026-09-01 20:55:35 +05:30
2026-08-19 12:41:45 -05:00
2025-10-01 23:29:25 +00:00
2026-08-31 00:56:41 -07:00
2026-09-01 09:28:01 -07:00
2026-08-24 15:37:22 +05:30
2026-08-31 09:56:43 -07:00
2026-08-31 12:36:33 -07:00
2026-08-24 03:21:07 -07:00
2026-08-24 03:21:07 -07:00
2026-08-16 01:50:20 -07:00
2026-08-23 17:01:31 -07:00
2026-08-31 20:43:36 -05:00
2026-08-30 01:20:27 -07:00
2026-08-30 01:20:27 -07:00
2026-08-16 12:20:50 +02:00
2026-07-23 11:44:43 -07:00
2026-08-17 16:34:02 -07:00
2026-06-21 12:09:16 -07:00
2026-08-20 04:54:14 -07:00
2026-09-01 08:36:03 -07:00
2026-08-26 18:23:33 -07:00
2026-08-20 19:56:28 -07:00
2026-08-26 18:23:33 -07:00
2026-08-31 10:05:13 -07:00
2026-08-28 05:45:00 -07:00
2026-08-28 12:20:40 -07:00
2026-09-01 00:35:29 +05:30
2026-08-31 09:56:43 -07:00
2026-08-16 06:29:53 -07:00
2026-08-27 13:48:51 -07:00
2026-08-25 10:54:42 +10:00
2026-08-31 07:28:22 -07:00
2026-08-15 23:37:22 -07:00
2026-08-31 09:56:04 -07:00
2026-08-23 19:31:35 -07:00
2026-08-29 18:34:35 -07:00
2026-08-31 10:00:38 -07:00
2026-07-18 18:40:59 -04:00
2026-08-14 21:35:30 -07:00
2026-09-01 09:28:01 -07:00
2026-09-01 09:28:01 -07:00
2026-08-23 18:27:21 -07:00
2026-08-14 22:33:58 -07:00
2026-09-01 09:28:01 -07:00
2026-09-01 09:28:01 -07:00
2026-08-14 21:58:09 -07:00
2026-08-14 21:58:09 -07:00
2026-08-16 11:34:40 -07:00
2026-08-13 02:38:28 -07:00
2026-08-31 10:00:55 -07:00
2026-08-31 10:53:18 -07:00
2026-08-31 10:53:18 -07:00
2026-08-28 12:36:15 -07:00
2026-08-14 21:58:09 -07:00
2026-08-27 07:52:26 -07:00
2026-08-27 07:52:26 -07:00
2026-08-17 02:40:59 -07:00
2026-08-15 01:55:22 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 21:30:53 -07:00
2026-08-23 19:15:28 -07:00
2026-08-16 23:26:10 -07:00
2026-08-23 13:34:32 +05:30
2026-08-14 21:36:41 -07:00
2026-08-31 12:22:17 -07:00
2026-08-20 11:37:01 +05:30
2026-08-14 21:45:08 -07:00
2026-08-31 10:03:34 -07:00
2026-08-17 15:12:53 -05:00
2026-08-17 16:39:47 -07:00
2026-05-28 22:26:25 -07:00
2026-08-16 20:43:13 -07:00
2026-08-31 05:56:18 -07:00
2026-08-31 11:23:48 -07:00
2026-08-31 09:56:04 -07:00
2026-08-25 23:15:49 -07:00
2026-08-31 09:56:54 -07:00
2026-08-21 21:53:11 +05:30
2026-08-31 09:56:43 -07:00
2026-08-23 02:55:03 +05:30
2026-08-22 04:02:29 +05:30
2026-08-15 02:22:58 -07:00
2026-08-22 14:33:20 +05:30
2026-08-23 18:25:12 -07:00
2026-08-23 20:01:41 -07:00
2026-08-23 18:25:12 -07:00
2026-08-27 07:52:26 -07:00
2026-08-31 09:58:40 -07:00
2026-08-15 00:36:03 -07:00
2026-08-27 11:26:57 +05:30
2026-08-16 06:26:37 -07:00
2026-09-01 20:55:35 +05:30
2026-08-24 04:01:53 -07:00
2026-08-23 17:43:39 -07:00
2026-07-29 13:10:23 -07:00
2026-08-31 09:56:43 -07:00