todo: close delivering a turn to a named session — answered from both ends

SendMessage does agent-to-agent with notify_when_idle instead of a poll, proven
tonight when one session took over the localisation hand-off from the owner. The
nudger does backend-to-session on a schedule, which is how a commander now reports
into its own conversation rather than a job panel.

Kept open deliberately: spawning a NEW session from a non-chat caller. The harness
Agent tool does not close that — it is available to a chat agent and nothing else,
which is why a commander's loop still shells out to claude -p.

Also kept: 'a spawned agent is invisible in the interface'. That is a defect in
Officer's own UI with a one-echo fix, and deleting it because an affordance now
describes coordination is exactly what docs/affordances.md warns about — an
affordance describing a defect calcifies it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-23 04:47:03 +00:00
co-authored by Claude Opus 5
parent c3c62828e3
commit 41fffbebe9
@@ -1,8 +1,8 @@
--- ---
id: agent-delivery/generalise-it-deliver-a-turn-to-a-named id: agent-delivery/generalise-it-deliver-a-turn-to-a-named
title: "Generalise it: deliver a turn to a named session, from anywhere in the backend" title: 'Generalise it: deliver a turn to a named session, from anywhere in the backend'
theme: agent-delivery theme: agent-delivery
status: open status: done
created: 2026-08-21 created: 2026-08-21
date_source: stated date_source: stated
order: 1 order: 1
@@ -12,7 +12,7 @@ order: 1
2026-08-21 — "ideal" is the owner's word for it. Today the only server-side caller is the nudger, 2026-08-21 — "ideal" is the owner's word for it. Today the only server-side caller is the nudger,
and delivery is welded to its schedule: a row in `nudges`, one per (user, session), a fixed and delivery is welded to its schedule: a row in `nudges`, one per (user, session), a fixed
message, a tick. What the dispatcher, the file watchers and Command HQ all want instead is a plain message, a tick. What the dispatcher, the file watchers and Command HQ all want instead is a plain
verb — *here is some text, deliver it to session X* — with the schedule, if any, belonging to the verb — _here is some text, deliver it to session X_ — with the schedule, if any, belonging to the
caller. caller.
Two things already established and worth not re-deriving. The nudger's `checkSafe` holds three Two things already established and worth not re-deriving. The nudger's `checkSafe` holds three
@@ -20,3 +20,20 @@ refusals — not live, live but generating, another live session in the same dir
comments above it carry why each one is there. And "not live" is the case that differs by caller: comments above it carry why each one is there. And "not live" is the case that differs by caller:
the nudger refuses (nudging a dead session would CREATE an agent, which is not what nudge means), the nudger refuses (nudging a dead session would CREATE an agent, which is not what nudge means),
while a dispatcher handing over five todos does want it created. while a dispatcher handing over five todos does want it created.
---
**Closed 2026-08-23.** Answered from both ends, and neither needed the general verb this asked for.
`SendMessage` delivers agent-to-agent with `notify_when_idle` replacing a poll — proven that night by one
session taking over the localisation hand-off from the owner, who had been relaying prompts by hand. And the
nudger delivers backend-to-session on a schedule, which is what a commander now uses to wake its own
conversation and report to the owner rather than into a job panel nobody reads.
The two together cover what was wanted. What remains genuinely missing is spawning a NEW session from a
non-chat caller — a shell loop, a plugin, a background job — and that is
`todo/sub-agents/an-api-endpoint-for-spawning-an-agent-with-a`, which stays open. The harness `Agent` tool
does not close it: it is available to a chat agent and to nothing else, which is exactly why a commander's
loop shells out to `claude -p` by hand.
The pattern is written down as an affordance now — `capabilities/affordances/officer/core/coordinating-another-agent.md`.