feat: continue in build agent when answering plan questions - #49218
Open
GanzellaLorenzo wants to merge 1 commit into
Open
GanzellaLorenzo wants to merge 1 commit into
GanzellaLorenzo wants to merge 1 commit into
Conversation
1 task
Answering a question through the question tool while the plan agent was active always kept the session in plan mode, so users had to answer, switch agents manually and often got asked to confirm again. question.reply now accepts an optional agent. When the user picks one, the question tool appends a synthetic user message with that agent (the same hand-off used by plan_exit) so the session continues in the build agent. - tui: ctrl+b answers and continues in build (keybind question_build) - app: "Answer & continue in build agent" button in the question dock
GanzellaLorenzo
force-pushed
the
plan-question-build
branch
from
September 15, 2026 19:12
80677b5 to
176e3de
Compare
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #7801
Type of change
What does this PR do?
Answering a question in plan mode kept the session in the plan agent, so you had to switch to build manually afterwards and the model often asked for confirmation again.
question.replynow accepts an optionalagent. When it is provided, the question tool hands the session over by appending a synthetic user message with that agent, the same mechanismplan_exitalready uses. Subagent sessions ignore it.ctrl+banswers and continues in build (question_buildkeybind). The dock shows actrl+b buildhint when the plan agent asked the question.How did you verify your code works?
bun test test/question/question.test.ts test/tool/question.test.ts test/session/prompt.test.ts- includes a session-level test where the plan agent asks a question, the reply carriesagent: "build", and the next turn runs in the build agent.ctrl+b build; pressing it closes the dock withYesrecorded and the composer switches toBuild, which finishes the turn.bun run typecheckfor the monorepo.Screenshots / recordings
No screenshot; this is the dock as rendered during the manual TUI run:
Checklist