fix(tools): treat dismissed questions as errors instead of proceeding#1421
Open
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
Open
fix(tools): treat dismissed questions as errors instead of proceeding#1421howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
When a user dismisses a question dialog (plan mode prompt, plan review, or AskUserQuestion) without choosing, the tool now returns is_error=True with an explicit "Do NOT proceed" instruction instead of a non-error result that tells the LLM to continue. Previously, EnterPlanMode returned "Proceed with implementation directly" on dismissal, causing the LLM to bypass planning and start coding — even when the user never gave permission. This was reported as reckless behavior in non-yolo mode. Closes MoonshotAI#1404
This was referenced Mar 13, 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.
Summary
Fixes #1404 — when a user dismisses a plan mode prompt or any question dialog without answering, the LLM now stops and waits instead of assuming permission to proceed.
Root cause:
EnterPlanMode,ExitPlanMode, andAskUserQuestionall returnedis_error=Falsewith directive output text when the user dismissed a question (empty answers{}). Most critically,EnterPlanModereturned "Proceed with implementation directly" — explicitly instructing the LLM to bypass planning and start coding without user consent.Fix: All three tools now return
is_error=Trueon dismissal with output text that explicitly tells the LLM: "Do NOT proceed. Stop and wait for the user's next message." Treating dismissal as an error condition ensures the LLM halts rather than interpreting silence as consent.Changes
tools/plan/enter.pyis_error=False, "Proceed with implementation directly"is_error=True, "Do NOT proceed"tools/plan/__init__.pyis_error=False, "Continue working on your plan"is_error=True, "Do NOT proceed"tools/ask_user/__init__.pyis_error=False, JSON with empty answersis_error=True, "Do NOT assume any answer"tests/core/test_plan_mode.pyassert not result.is_errorassert result.is_error+ content checkstests/tools/test_ask_user.pyassert not result.is_error+ JSON parseassert result.is_error+ content checkstests_e2e/test_wire_question.pyassert not rv["is_error"]assert rv["is_error"]Test plan
tests/core/test_plan_mode.py,tests/tools/test_ask_user.py)kimi, trigger plan mode, dismiss the dialog → LLM should stop and wait