User intervention while call_subordinate is running silently drops the subordinate's turn (no result, no error, no agent activity) #79

Closed
opened 2026-09-04 16:10:26 +00:00 by nsaspy · 1 comment
Owner

Summary

A user message sent while a call_subordinate delegation was executing left the subordinate context with its assignment but zero agent activity — no LLM turn, no tool result back to the parent, no error, and no log entry explaining the abandonment. The subordinate chat is silently orphaned.

Evidence (2026-09-04, container UTC times)

  • 15:15:01Z — parent chat xPXTvnZd (Agent Zero, agent 0) delegates a code-audit task via call_subordinate (profile developer). Console shows A0: Using tool 'call_subordinate' and User message (subordinate).
  • 15:15:01Z — subordinate context 2YzAtHjD is created. Its chat.json contains exactly one log entry (the subordinate user message); iteration_no never increments; no util, agent, or error entry ever appears.
  • 15:15:02Z — a user message ("Ok update it to be mara") arrives as an intervention on the parent.
  • The parent proceeds with the intervention and continues working (next parent turn at 15:15:11Z), but never receives a result for the delegation — the parent chat log ends right after the delegation with no Response from tool 'call_subordinate'.
  • No error is logged in either chat or the container console. The subordinate context sat idle for 15+ minutes with an unanswered task.

Suspected mechanism

Delegation.execute → run_subordinate awaits the child as a nested coroutine (await subordinate.monologue(), tools/call_subordinate.py:203) inside the parent's task. When the user intervention is processed, the unwind across the nested-monologue boundary aborts the child's turn without cancellation cleanup, without a tool result for the parent, and without any record in the child chat.

Impact

  • Silent task loss: delegated work is dropped with no trace.
  • Orphaned chat: the subordinate context keeps an unanswered user message; nothing will ever resume it.
  • The parent believes it delegated successfully and may report the task as started.

Suggested fix

At the run_subordinate boundary, catch intervention/cancellation and make abandonment explicit — either:

  1. let the in-flight child turn finish and deliver the intervention afterwards, or
  2. cancel the child deterministically and write a warning entry into the child chat ("subordinate task was interrupted before any agent activity; re-send the task to retry") plus return a tool result to the parent stating the delegation was interrupted.

Add a regression test: send a user intervention while call_subordinate is executing and assert the child chat either completes with a result or contains an explicit interruption warning — never silently empty.

## Summary A user message sent while a `call_subordinate` delegation was executing left the subordinate context with its assignment but **zero** agent activity — no LLM turn, no tool result back to the parent, no error, and no log entry explaining the abandonment. The subordinate chat is silently orphaned. ## Evidence (2026-09-04, container UTC times) - `15:15:01Z` — parent chat `xPXTvnZd` (Agent Zero, agent 0) delegates a code-audit task via `call_subordinate` (profile `developer`). Console shows `A0: Using tool 'call_subordinate'` and `User message (subordinate)`. - `15:15:01Z` — subordinate context `2YzAtHjD` is created. Its `chat.json` contains exactly **one** log entry (the subordinate user message); `iteration_no` never increments; no `util`, `agent`, or error entry ever appears. - `15:15:02Z` — a user message ("Ok update it to be mara") arrives as an intervention on the parent. - The parent proceeds with the intervention and continues working (next parent turn at `15:15:11Z`), but never receives a result for the delegation — the parent chat log ends right after the delegation with no `Response from tool 'call_subordinate'`. - No error is logged in either chat or the container console. The subordinate context sat idle for 15+ minutes with an unanswered task. ## Suspected mechanism `Delegation.execute` → `run_subordinate` awaits the child as a **nested coroutine** (`await subordinate.monologue()`, `tools/call_subordinate.py:203`) inside the parent's task. When the user intervention is processed, the unwind across the nested-monologue boundary aborts the child's turn without cancellation cleanup, without a tool result for the parent, and without any record in the child chat. ## Impact - Silent task loss: delegated work is dropped with no trace. - Orphaned chat: the subordinate context keeps an unanswered user message; nothing will ever resume it. - The parent believes it delegated successfully and may report the task as started. ## Suggested fix At the `run_subordinate` boundary, catch intervention/cancellation and make abandonment explicit — either: 1. let the in-flight child turn finish and deliver the intervention afterwards, or 2. cancel the child deterministically and write a warning entry into the child chat ("subordinate task was interrupted before any agent activity; re-send the task to retry") plus return a tool result to the parent stating the delegation was interrupted. Add a regression test: send a user intervention while `call_subordinate` is executing and assert the child chat either completes with a result or contains an explicit interruption warning — never silently empty.
Author
Owner

Closed for tracker sync: resolved and closed on Forgejo as nsaspy/a0-symbolics#71. Keeping both trackers at parity.

Closed for tracker sync: resolved and closed on Forgejo as nsaspy/a0-symbolics#71. Keeping both trackers at parity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/a0-symbolics#79
No description provided.