docs(core): correct the rationale for notifying a stalled child's parent

The user can message any agent from the TUI, not only the root, so the
justification is that the parent is an agent with no other way to learn
the child parked - not that the child has no human resumer.
This commit is contained in:
Ahmed Allam
2026-08-02 02:15:51 +03:00
committed by Ahmed Allam
parent 8f1bb64d16
commit 742f382836
2 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -537,9 +537,9 @@ async def _exhausted_recovery(
agent_id,
)
await coordinator.set_status(agent_id, "waiting")
# The user talks to the root, so parking is only self-service there. A parked
# subagent owes its parent a report it can no longer send, and the parent would
# otherwise wait out its full timeout for a message that is never coming.
# A parked child owes its parent a completion report it can no longer send. The
# parent is an agent, not a watching human, so nothing else tells it to stop
# waiting and it burns its full timeout on a message that is never coming.
await _notify_parent_on_stall(coordinator, agent_id)
return result
+5 -4
View File
@@ -895,10 +895,11 @@ async def test_interactive_recovery_exhaustion_parks_instead_of_crashing(
async def test_interactive_subagent_exhaustion_tells_its_parent(
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""The user only talks to the root, so a parked child must report up.
"""A parked child must report up so its parent stops waiting on it.
Otherwise a parent blocked in wait_for_message burns its whole timeout
waiting for a completion report the child can no longer send.
The parent is an agent, not a watching human, so a parent blocked in
wait_for_message otherwise burns its whole timeout on a completion
report the child can no longer send.
"""
coordinator = AgentCoordinator()
await coordinator.register("root", "strix", parent_id=None)
@@ -924,7 +925,7 @@ async def test_interactive_subagent_exhaustion_tells_its_parent(
async def test_interactive_root_exhaustion_notifies_nobody(
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""A parked root is self-service: the user is already watching it."""
"""The root has no parent to report to, so parking stays silent."""
coordinator = AgentCoordinator()
await coordinator.register("root", "strix", parent_id=None)
monkeypatch.setattr(