[BUG] "Clear context" option missing from plan mode exit dialog in --dangerously-skip-permissions mode

Resolved 💬 9 comments Opened Mar 21, 2026 by hoffjero Closed Mar 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and confirmed this is not a duplicate
  • [x] I can reproduce this bug

Bug Description

When running Claude Code with --dangerously-skip-permissions, the plan mode exit dialog (ExitPlanMode) sometimes does not include the "clear context" option. The options shown are:

  1. Yes, and bypass permissions
  2. Yes, manually approve edits
  3. Type here to tell Claude what to change

The expected options (based on normal mode and previous sessions) should include a "clear context" variant:

  1. Yes, clear context and bypass permissions ← missing
  2. Yes, and bypass permissions
  3. Yes, manually approve edits
  4. Type here to tell Claude what to change

Key detail: this is inconsistent

The "clear context" option did appear in earlier sessions (same day, same flags, same version). In later sessions on the same day, it stopped appearing. No configuration was changed between sessions.

Steps to Reproduce

  1. Start Claude Code with --dangerously-skip-permissions
  2. Enter plan mode (Shift+Tab)
  3. Ask Claude to create a plan
  4. When the plan is complete and ExitPlanMode triggers, observe the options
  5. Note that "clear context and bypass permissions" is sometimes missing

Expected Behavior

The "clear context" option should always appear in the exit dialog, regardless of permission mode. It's a valuable workflow option that allows users to start implementation with a fresh context window while retaining the saved plan file.

Relation to #18599

Issue #18599 discusses making the default option configurable. This issue is different: the "clear context" option is not shown at all in --dangerously-skip-permissions mode (or appears inconsistently).

Environment

  • Claude Code version: 2.1.81
  • OS: macOS (Darwin 25.3.0)
  • Permission mode: --dangerously-skip-permissions
  • Shell: zsh

Screenshot

The following screenshot shows the plan mode exit dialog without the "clear context" option:

!Plan mode exit options showing only 3 options, missing "clear context"

_(Options shown: "Yes, and bypass permissions" / "Yes, manually approve edits" / "Type here to tell Claude what to change")_

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗