Wake parents for parked director questions - #841
Conversation
TheGreatAxios
left a comment
There was a problem hiding this comment.
Primary · Comment
Idle TUI parent wakes on top-level ask_director parks; replies use send_input target with the worker session ID.
GitHub will not accept an approve from this account (own PR). Merge verdict from this read: no blocking defects in origin/main...HEAD (14 files). Snapshot-before-fleet, rotation barrier, internal-origin quota replay, and idle-worker gates match the stated contract.
Checks
git log --oneline origin/main..HEAD: three in-scope commits (dab784c0,7205e47e,482db17d).git diff origin/main...HEAD --stat: 14 source/doc files, noBin.git log origin/main..HEAD --format='%s'/'%b'plusawk 'length > 72': subjects are plain English, no prefixes/paths/trailing punctuation; bodies empty.git show --statper commit: subjects match their trees.482db17dalso uses the samelanessnapshot for live fleet count (one line, same concern).bun run checkat this SHA (482db17d): exit 0, 6315 pass / 0 fail / 447 files (prior session, HEAD unchanged).
Gaps
Did not re-run live-provider or manual TUI this pass. Nested-orchestrator asks are excluded by parentSessionId and covered in unit tests, not a live nested session.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Greybeard · Request changes
Idle TUI parents receive one coalesced ask_director wake through an authoritative store snapshot and idle-send, rather than only wait_agents pull.
GitHub refused --request-changes on this PR (own-PR limitation); the lens verdict is still revise.
Findings
src/agent/directors/skywalker/package.ts:23— Parent contract still says worker questions arrive only whenwait_agentsreturns statusrunningplus a question. This branch adds a second inbound (synthetic idle-send) the parent must answer withsend_inputtarget= session id. That contract belongs on the director, not only inpendingAskWakeText. The package test atsrc/agent/directors/skywalker/package.test.ts:188locks the stalerunningwording.docs/PRODUCT.md:171— Same pull-only contract and stalerunningstatus. Public product surface now disagrees withdocs/ARCHITECTURE.md.
Notes
- Snapshot/coalesce, rotation barrier, session-id targeting, and unmixing worker gates from
isProcessingown the TUI-idle constraint at the right layer. - Nested asks staying pull-only is accepted: idle-orchestrator is Skywalker/TUI, not nested directors.
- Reusing the user idle-send pipe is acceptable only if the director prompt names that inbound so it is not treated as operator chat.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Verdict: approve (cannot GitHub-approve own PR).
CL-7524 holds at 3f62f0a4. Idle TUI parent wakes once for parked ask_director; send_input target is the worker session id; snapshots drop resolved/cancelled/replaced/nested asks; synthetic wakes skip /feedback and leave queued follow-ups.
Should-fix: leftover delivery still runs worker-authored wake text through ingestOperatorPrompt (src/tui/runtime-bridge.ts sendInternalText → src/tui/runner/submit.ts leftover send). A parked question that contains @src/foo.ts or an inline image path can be rewritten and miss the echo, so the transcript paints a second user row and the parent model sees ingest output instead of the parked question. Common "Which port?" asks are fine.
Could leftover send skip ingest for ask_director wake text the same way it already skips sent-message history?
TheGreatAxios
left a comment
There was a problem hiding this comment.
Verdict: approve (GitHub cannot approve own PR).
CL-7524 holds at 3f62f0a4. Idle TUI parent wakes once for parked ask_director; send_input target is the worker session id; snapshots drop resolved/cancelled/replaced/nested asks; synthetic wakes skip /feedback and leave queued follow-ups.
Should-fix: leftover delivery still runs worker-authored wake text through ingestOperatorPrompt (src/tui/runtime-bridge.ts sendInternalText → src/tui/runner/submit.ts leftover send). A parked question that contains @src/foo.ts or an inline image path can be rewritten and miss the echo, so the transcript paints a second user row and the parent model sees ingest output instead of the parked question. Common "Which port?" asks are fine.
Could leftover send skip ingest for ask_director wake text the same way it already skips sent-message history?
94f79ef to
0d8756d
Compare
0d8756d to
b086d04
Compare
b086d04 to
0880831
Compare
0880831 to
cec76d7
Compare
cec76d7 to
60549b2
Compare
Wait JSON running-plus-question was the wrong pull contract, and an idle parent still has to see parked questions after a stop.
Leftover hops used operator ingest, so a parked @path was rewritten before echo matching could consume the raw wake.
…ssage skip Leftover ingest skip and sent-message skip both matched the wake prefix as a string literal. Export ASK_DIRECTOR_WAKE_PREFIX from fleet-report (the wake text source) and use it in queued-delivery and submit.
60549b2 to
7034fe0
Compare
Summary
ask_director.send_inputtargetset to the worker session ID, not a shared catalog name./feedbackcapture and leave queued user follow-ups alone.Verification
bun run typecheck,bun run build, andbun run testpassbun run checkpass (6315 pass, 0 fail, 447 files)Fixes CL-7524