claude-code - 💡(How to fix) Fix Permission mode toggle (shift+tab) does not persist to settings.json [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49120Fetched 2026-04-17 08:50:18
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5cross-referenced ×2commented ×1

When toggling the permission mode via shift+tab in the Claude Code CLI, the runtime mode changes correctly (visible in the status bar) but the change is not persisted to ~/.claude/settings.json. This causes:

  1. Subagents get the wrong mode. Subagents spawned via the Agent tool read settings.json to determine their permission mode. If the user toggled to bypassPermissions in the UI but the file still says dontAsk, subagents run in dontAsk mode and get blocked on tool calls they can't prompt for (especially background agents).

  2. Next session reverts. Restarting Claude Code reverts to the persisted mode, not the one the user selected.

Root Cause

When toggling the permission mode via shift+tab in the Claude Code CLI, the runtime mode changes correctly (visible in the status bar) but the change is not persisted to ~/.claude/settings.json. This causes:

  1. Subagents get the wrong mode. Subagents spawned via the Agent tool read settings.json to determine their permission mode. If the user toggled to bypassPermissions in the UI but the file still says dontAsk, subagents run in dontAsk mode and get blocked on tool calls they can't prompt for (especially background agents).

  2. Next session reverts. Restarting Claude Code reverts to the persisted mode, not the one the user selected.

Fix Action

Workaround

Manually edit ~/.claude/settings.json to set "defaultMode": "bypassPermissions".

RAW_BUFFERClick to expand / collapse

Description

When toggling the permission mode via shift+tab in the Claude Code CLI, the runtime mode changes correctly (visible in the status bar) but the change is not persisted to ~/.claude/settings.json. This causes:

  1. Subagents get the wrong mode. Subagents spawned via the Agent tool read settings.json to determine their permission mode. If the user toggled to bypassPermissions in the UI but the file still says dontAsk, subagents run in dontAsk mode and get blocked on tool calls they can't prompt for (especially background agents).

  2. Next session reverts. Restarting Claude Code reverts to the persisted mode, not the one the user selected.

Reproduction

  1. Set "defaultMode": "dontAsk" in ~/.claude/settings.json
  2. Launch Claude Code
  3. Press shift+tab to cycle to "bypass permissions on"
  4. Verify the status bar shows "bypass permissions on"
  5. Read ~/.claude/settings.json — it still says "dontAsk"
  6. Spawn a background agent — it runs in dontAsk mode and fails on Edit/Write tools

Expected behavior

Toggling the permission mode via shift+tab should persist the new value to settings.json so that subagents and future sessions use the same mode.

Workaround

Manually edit ~/.claude/settings.json to set "defaultMode": "bypassPermissions".

Environment

  • Claude Code CLI (desktop app, macOS)
  • Claude Opus 4.6 (1M context)
  • macOS Darwin 24.6.0

extent analysis

TL;DR

The issue can be temporarily worked around by manually editing ~/.claude/settings.json to reflect the desired permission mode, but a permanent fix requires ensuring that the Claude Code CLI properly updates this file when the user toggles the permission mode via shift+tab.

Guidance

  • Verify that the shift+tab shortcut is correctly bound to the function responsible for toggling the permission mode and that this function includes the logic to update ~/.claude/settings.json.
  • Check the code for any errors or exceptions that might occur when attempting to write to ~/.claude/settings.json, which could prevent the file from being updated.
  • Confirm that the subagents are correctly reading the defaultMode from ~/.claude/settings.json and that there are no caching issues that might cause them to use a stale version of the settings.
  • Investigate if there are any file system permissions issues that could prevent the Claude Code CLI from writing to ~/.claude/settings.json.

Example

No specific code example can be provided without access to the Claude Code CLI's source code, but the fix would involve ensuring that the function toggling the permission mode also updates the defaultMode in ~/.claude/settings.json.

Notes

The provided workaround suggests that the issue is with the persistence of the setting rather than its application during the current session. The fix must ensure that the defaultMode in ~/.claude/settings.json is updated whenever the user changes the permission mode.

Recommendation

Apply the workaround by manually editing ~/.claude/settings.json until a fix is implemented that ensures the Claude Code CLI correctly updates this file when the permission mode is toggled, as this will at least allow users to set the desired mode persistently.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Toggling the permission mode via shift+tab should persist the new value to settings.json so that subagents and future sessions use the same mode.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Permission mode toggle (shift+tab) does not persist to settings.json [1 comments, 2 participants]