Skip to content

fix(plan): exit_plan_mode silently rejected under YOLO#132

Merged
mabry1985 merged 3 commits into
devfrom
fix/exit-plan-mode-yolo-bypass
Apr 26, 2026
Merged

fix(plan): exit_plan_mode silently rejected under YOLO#132
mabry1985 merged 3 commits into
devfrom
fix/exit-plan-mode-yolo-bypass

Conversation

@mabry1985

@mabry1985 mabry1985 commented Apr 26, 2026

Copy link
Copy Markdown

Summary

  • In YOLO mode (and any path where finalPermission==='allow'), the scheduler and ACP session bypassed getConfirmationDetails() for exit_plan_mode, so the tool's onConfirm never ran. wasApproved stayed false and execute() returned "Plan execution was not approved" even though the user expected the plan to proceed.
  • Fix: exempt exit_plan_mode from the YOLO bypass in coreToolScheduler.ts:936 and Session.ts:900, mirroring the existing ask_user_question exemption. The plan dialog now always fires in YOLO, the closure flips wasApproved, and execute() reports approval correctly.
  • Scope: YOLO path only. A permission rule that explicitly resolves exit_plan_mode to allow would still hit the same shape — easy follow-up if needed.

Test plan

  • vitest run packages/core/src/tools/exitPlanMode.test.ts (16 pass)
  • vitest run packages/core/src/core/coreToolScheduler.test.ts (54 pass)
  • vitest run packages/cli/src/acp-integration/session/Session.test.ts (15 pass)
  • CI passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Version Updates

    • Bumped main version to 0.26.14 and internal packages to 0.26.13
    • Updated sandbox container image references
  • Bug Fixes

    • Fixed confirmation handling for plan mode exit to properly capture user approval state
  • Localization

    • Updated user-facing feedback and session prompts across German, Portuguese, Russian, and Chinese locales

mabry1985 and others added 3 commits April 26, 2026 09:34
Co-authored-by: Automaker <automaker@localhost>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
YOLO bypassed getConfirmationDetails for exit_plan_mode, so the tool's
onConfirm never ran and wasApproved stayed false — execute() then
reported "Plan execution was not approved" even when the user wanted
the plan to proceed. Treat exit_plan_mode like ask_user_question and
keep the confirmation dialog wired up in YOLO mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mabry1985 mabry1985 merged commit f331e9e into dev Apr 26, 2026
@mabry1985 mabry1985 deleted the fix/exit-plan-mode-yolo-bypass branch April 26, 2026 18:30
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2cd47813-2338-4f04-ae0d-5436e766fc93

📥 Commits

Reviewing files that changed from the base of the PR and between 1cbd798 and 857eac3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • package.json
  • packages/cli/package.json
  • packages/cli/src/acp-integration/session/Session.ts
  • packages/cli/src/i18n/locales/de.js
  • packages/cli/src/i18n/locales/pt.js
  • packages/cli/src/i18n/locales/ru.js
  • packages/cli/src/i18n/locales/zh.js
  • packages/cli/src/ui/FeedbackDialog.tsx
  • packages/core/package.json
  • packages/core/src/core/coreToolScheduler.ts
  • packages/test-utils/package.json
  • packages/web-templates/package.json
  • packages/webui/package.json

Walkthrough

A version bump from 0.26.13 to 0.26.14 across multiple packages, combined with updates to i18n locale files and UI text replacing "Qwen" references with "proto", and adjustments to YOLO approval mode logic to exclude exit_plan_mode from auto-approval.

Changes

Cohort / File(s) Summary
Package Version Bumps
package.json, packages/cli/package.json, packages/core/package.json, packages/test-utils/package.json, packages/web-templates/package.json, packages/webui/package.json
Version increments from 0.26.12/0.26.13 to 0.26.13/0.26.14. Root and CLI packages also update sandbox container image tag to 0.26.14.
i18n Locale Updates
packages/cli/src/i18n/locales/de.js, packages/cli/src/i18n/locales/pt.js, packages/cli/src/i18n/locales/ru.js, packages/cli/src/i18n/locales/zh.js
Replace i18n message key from "How is Qwen doing this session? (optional)" to "How is proto doing this session? (optional)" while preserving translated text values.
UI Feedback Update
packages/cli/src/ui/FeedbackDialog.tsx
Update feedback question text from "Qwen" to "proto" in user-facing prompt.
YOLO Approval Mode Logic
packages/cli/src/acp-integration/session/Session.ts, packages/core/src/core/coreToolScheduler.ts
Exclude exit_plan_mode from YOLO auto-approval bypass (alongside existing ask_user_question exemption) to ensure confirmation dialog's onConfirm callback executes for state capture.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/exit-plan-mode-yolo-bypass

Comment @coderabbitai help to get the list of available commands and usage tips.

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