Skip to content

Wake parents for parked director questions - #841

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-7524-wake-parents-for-parked-director-questions
Sep 10, 2026
Merged

Wake parents for parked director questions#841
TheGreatAxios merged 6 commits into
mainfrom
cl-7524-wake-parents-for-parked-director-questions

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • An idle TUI parent receives one coalesced wake when a top-level worker parks on ask_director.
  • Wakes wait through live parent turns, operator gates, and parent-idle fleet holds, then reply with send_input target set to the worker session ID, not a shared catalog name.
  • Authoritative snapshots drop resolved, cancelled, replaced, and nested asks. Session rotation suppresses stale publications. Synthetic wakes use the idle delivery path, so they skip composer /feedback capture and leave queued user follow-ups alone.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check pass (6315 pass, 0 fail, 447 files)

Fixes CL-7524

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

CL-7524

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, no Bin.
  • git log origin/main..HEAD --format='%s' / '%b' plus awk 'length > 72': subjects are plain English, no prefixes/paths/trailing punctuation; bodies empty.
  • git show --stat per commit: subjects match their trees. 482db17d also uses the same lanes snapshot for live fleet count (one line, same concern).
  • bun run check at 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 TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 when wait_agents returns status running plus a question. This branch adds a second inbound (synthetic idle-send) the parent must answer with send_input target = session id. That contract belongs on the director, not only in pendingAskWakeText. The package test at src/agent/directors/skywalker/package.test.ts:188 locks the stale running wording.
  • docs/PRODUCT.md:171 — Same pull-only contract and stale running status. Public product surface now disagrees with docs/ARCHITECTURE.md.

Notes

  • Snapshot/coalesce, rotation barrier, session-id targeting, and unmixing worker gates from isProcessing own 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 TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sendInternalTextsrc/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 TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sendInternalTextsrc/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
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from 94f79ef to 0d8756d Compare September 9, 2026 22:23
@TheGreatAxios
TheGreatAxios changed the base branch from main to cl-7538-retry-failed-fleet-workers-instead-of-idling-the September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios added this pull request to stack #856 September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from 0d8756d to b086d04 Compare September 10, 2026 00:46
@TheGreatAxios
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from b086d04 to 0880831 Compare September 10, 2026 00:48
@TheGreatAxios
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from 0880831 to cec76d7 Compare September 10, 2026 00:50
@TheGreatAxios
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from cec76d7 to 60549b2 Compare September 10, 2026 00:53
Base automatically changed from cl-7538-retry-failed-fleet-workers-instead-of-idling-the to main September 10, 2026 00:55
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.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7524-wake-parents-for-parked-director-questions branch from 60549b2 to 7034fe0 Compare September 10, 2026 00:55
@TheGreatAxios
TheGreatAxios merged commit 7801f23 into main Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant