Files
ai-agent/backend/test_worker_routing.py
Gabriel Vidal 74393fa474 feat(hub): deliver a follow-up into a live run through its inbox
_send_message now POSTs the prompt to the sidecar's /message first: a
run that is still alive keeps its background work (a build, a subagent,
a Monitor on a form) and reads the message between tool calls, or at
once when idle. Only 404 (nothing live) or 409 (the run can't take it —
a pi run, an older CLI) falls back to the old stop-then-resume.

Claude Code records such a message as a peer's ("Another Claude session
sent a message … not typed by your user"); the sidecar prefixes the text
to say it is the user's, and conversations._unwrap_inbox shows the plain
user turn. SpawnResult gains `delivered: "inbox"`.

Docs: the headless background-task semantics in CLAUDE.md and
PROJECT_CLAUDE.md; FakeWorker learns /message for the routing tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 23:24:50 +02:00

10 KiB