Skip to content

fix(tools): treat dismissed questions as errors instead of proceeding#1421

Open
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
howardpen9:fix/dismissal-should-not-proceed
Open

fix(tools): treat dismissed questions as errors instead of proceeding#1421
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
howardpen9:fix/dismissal-should-not-proceed

Conversation

@howardpen9
Copy link
Contributor

@howardpen9 howardpen9 commented Mar 12, 2026

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, and AskUserQuestion all returned is_error=False with directive output text when the user dismissed a question (empty answers {}). Most critically, EnterPlanMode returned "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=True on 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

File Before After
tools/plan/enter.py is_error=False, "Proceed with implementation directly" is_error=True, "Do NOT proceed"
tools/plan/__init__.py is_error=False, "Continue working on your plan" is_error=True, "Do NOT proceed"
tools/ask_user/__init__.py is_error=False, JSON with empty answers is_error=True, "Do NOT assume any answer"
tests/core/test_plan_mode.py assert not result.is_error assert result.is_error + content checks
tests/tools/test_ask_user.py assert not result.is_error + JSON parse assert result.is_error + content checks
tests_e2e/test_wire_question.py assert not rv["is_error"] assert rv["is_error"]

Test plan

  • All 48 unit tests pass (tests/core/test_plan_mode.py, tests/tools/test_ask_user.py)
  • Manual: run kimi, trigger plan mode, dismiss the dialog → LLM should stop and wait
  • Manual: trigger AskUserQuestion, dismiss → LLM should not assume an answer
  • Manual: in plan mode, call ExitPlanMode, dismiss review → LLM should stay in plan mode and wait

Open with Devin

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
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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.

Reckless behaviour

1 participant