Repository navigation
F: run plan suggestions through lane D in planning's own worker (#117, part 2) - #120
Merged
Merged
Conversation
… part 2) - AgentWorker (was QuestionWorker) and question-worker.ts serve one feature each; LeftoverLedger, worker roots, locks and recovery wording take a WorkerNaming. Ask's names and messages are unchanged (ASK_NAMING). - Planning gets its own worker, TMPDIR root, ledger, lock and per-database owner token (planning_owner), so its recovery never touches Ask's or the runner's agents. - PlanningAgent (runner/planning.ts) runs each request at the snapshot head of the review repository, with the Settings vendor; Codex is refused (#93). - E3's suggestion timer and the request share one ten-minute budget. - The server awaits PlanningDeps.describe before a start; web/planning.ts reads the issue from GitHub with a bound and is on for any non-demo review with a github block. - Real-Docker planning test in the agent-isolation workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A suggestion start replays its recorded outcome before reading GitHub, and reads nothing for a start that would be refused (no planning, shutdown, stale revision or snapshot). A GitHub failure is a 502, not recorded; a shutdown during the read is a 503. - Shutdown gives planning requests Ask's 20 s grace after E3 aborts them, then closes planning's worker, which abandons one stuck in lane D's setup. - Docs: a crashed process's container runs until Claude exits or the next planning request's recovery removes it (no host-side deadline is left). - Tests: E3 budget wiring, deadline lower bound, replay without GitHub, 502, 503, shutdown bound, reverse isolation, worker-side refusal of another feature's job, and a leak check in the real-Docker planning test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #117, after #118. Plan suggestions now run Claude through lane D in production.
What changes
AgentWorker(formerlyQuestionWorker, which stays as an alias) andrunner/question-worker.tseach serve one feature.LeftoverLedger, worker roots, locks, the record file and the recovery wording now take aWorkerNaming.ASK_NAMINGreproduces every Ask name and message exactly.codeboost-plan-*), ledger (<db>.planning-leftovers.json), lock directory and a per-database owner token (planning_owner). Its recovery never touches Ask's or the runner's Docker objects, and Ask's never touches planning's.PlanningAgent(runner/planning.ts) runs each request on the review repository at the current snapshot head, with the vendor chosen in Settings. Codex is refused before any lock, worker or Docker work (D: decide how Codex reads code in review, execute and fix (shell is off in every phase) #93).PLANNING_BUDGET_MS). The worker's deadline leaves Ask's 5 s settle margin.PlanningDeps.describemay be async. The server replays a recorded start first, then reads the issue from GitHub before the recorded action, using the existing bounded, collaborators-onlyissueText. A GitHub failure returns 502 and is not recorded. A shutdown during the read returns 503.web/planning.tsandweb/cli.tsturn planning on for any non-demo review with agithubblock. Demos never plan.Behavior to note
runner-lifecycle.mdis updated to say so; it previously said startup recovery stopped it.github.baseBranchonce that lands.Validation
npm run typecheck: passed.npm testcommand: 62 files, 1417 tests passed.test/agent-planning.test.ts, added to the agent-isolation workflow) passes locally. A fake token reaches Anthropic from inside the container and gets a 401, and the test checks that nothing carrying planning's owner is left behind.question-agent,question-leftovers,questions) pass unchanged.Independent review
A fresh subagent compared Ask's names, messages and step order with main and found no difference Ask could observe. It also confirmed the isolation between Ask and planning and the security of the issue text. Fixed from its findings:
Not changed:
WorkerNaming's size;🤖 Generated with Claude Code