claude-code - 💡(How to fix) Fix [Bug] Permission mode "auto" not inherited in new sessions and cannot be set mid-session [2 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#55558Fetched 2026-05-03 04:50:17
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

Error Message

[{"error":"Error: Plugin path not found: C:\Users\Robbie\.claude\plugins\marketplaces\claude-plugins-official\external_plugins\autofix-bot\n at AU1 (B:/~BUN/root/src/entrypoints/cli.js:2525:8003)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.397Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.482Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n at async X (B:/~BUN/root/src/entrypoints/cli.js:4860:17025)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.906Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n at async G (B:/~BUN/root/src/entrypoints/cli.js:4860:17741)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.907Z"}]

Code Example

[{"error":"Error: Plugin path not found: C:\\Users\\Robbie\\.claude\\plugins\\marketplaces\\claude-plugins-official\\external_plugins\\autofix-bot\n    at AU1 (B:/~BUN/root/src/entrypoints/cli.js:2525:8003)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.397Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.482Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at async X (B:/~BUN/root/src/entrypoints/cli.js:4860:17025)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.906Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at async G (B:/~BUN/root/src/entrypoints/cli.js:4860:17741)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.907Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Title: auto permission mode not inherited by new sessions and cannot be set mid-session

Product: Claude Code Desktop (Windows) defaultMode setting: "auto" in ~/.claude/settings.json

SUMMARY When defaultMode is set to "auto" in ~/.claude/settings.json, new Claude Code sessions do not inherit it. The session appears to start in auto mode but switches to "default" (ask-every-time) after the first message. Additionally, clicking auto mode in the permission selector mid-session causes the UI to immediately flip back to the previous mode — auto cannot be set at all during that session.

This does NOT occur with defaultMode: "bypassPermissions" — that value is correctly inherited by all new sessions and persists without issue.

STEPS TO REPRODUCE

  1. Set permissions.defaultMode: "auto" in ~/.claude/settings.json
  2. Set skipAutoPermissionPrompt: true
  3. Restart Claude Desktop
  4. Open a new Claude Code session
  5. Send one message
  6. Check the permission mode indicator

Expected: Session stays in auto mode Actual: Session switches to "default" after first message

  1. Click the permission selector and choose "auto"

Expected: Mode switches to auto and stays Actual: Mode immediately flips back — auto cannot be set mid-session

OBSERVED SESSION STATE Per-session state files at: C:/Users/[user]/AppData/Roaming/Claude/claude-code-sessions/[account-uuid]/[workspace-uuid]/[session-id].json

Each file has a permissionMode field. With defaultMode: "bypassPermissions", all session files correctly show permissionMode: bypassPermissions. With defaultMode: "auto", new session files show permissionMode: default instead — the global default is being ignored specifically for the "auto" value.

ENVIRONMENT

  • OS: Windows 11
  • Claude Desktop, auto-updates enabled (latest channel)
  • skipAutoPermissionPrompt: true
  • skipDangerousModePermissionPrompt: true

HYPOTHESIS There may be a validation or normalisation step that strips "auto" when writing the per-session state file after the first turn. Worth checking the code path that writes permissionMode to the session JSON on first message completion.

Environment Info

  • Platform: win32
  • Terminal: null
  • Version: 2.1.77
  • Feedback ID: 23374772-748a-4920-99b5-09f2cbc8b181

Errors

[{"error":"Error: Plugin path not found: C:\\Users\\Robbie\\.claude\\plugins\\marketplaces\\claude-plugins-official\\external_plugins\\autofix-bot\n    at AU1 (B:/~BUN/root/src/entrypoints/cli.js:2525:8003)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.397Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:20:31.482Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at async X (B:/~BUN/root/src/entrypoints/cli.js:4860:17025)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.906Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FEH (B:/~BUN/root/src/entrypoints/cli.js:2532:32833)\n    at async G (B:/~BUN/root/src/entrypoints/cli.js:4860:17741)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T11:21:17.907Z"}]

extent analysis

TL;DR

The issue with the auto permission mode not being inherited by new sessions and unable to be set mid-session may be due to a validation or normalization step that strips the "auto" value when writing the per-session state file.

Guidance

  • Investigate the code path that writes permissionMode to the session JSON on first message completion to identify any validation or normalization steps that might be causing the issue.
  • Check the per-session state files at C:/Users/[user]/AppData/Roaming/Claude/claude-code-sessions/[account-uuid]/[workspace-uuid]/[session-id].json to see if the permissionMode field is being overwritten or modified after the first message.
  • Verify that the defaultMode setting in ~/.claude/settings.json is being read correctly and applied to new sessions.
  • Consider adding logging or debugging statements to track the value of permissionMode throughout the session to identify where it is being changed.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The provided error messages do not seem to be directly related to the issue with the auto permission mode. The issue may be specific to the Windows platform or the version of Claude Desktop being used (2.1.77).

Recommendation

Apply a workaround by setting defaultMode to a different value, such as "bypassPermissions", to see if the issue is specific to the "auto" value. This may help identify if the issue is with the validation or normalization step or with the auto value itself.

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…

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 [Bug] Permission mode "auto" not inherited in new sessions and cannot be set mid-session [2 comments, 2 participants]