claude-code - 💡(How to fix) Fix Expose current permission mode in statusline JSON [1 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#52083Fetched 2026-04-23 07:37:00
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Fix Action

Fix / Workaround

Workaround today

RAW_BUFFERClick to expand / collapse

The statusline script receives a JSON payload on stdin, documented at https://code.claude.com/docs/en/statusline.md. It includes model, workspace, cost, context_window, output_style, etc., but does not include the current permission mode (the one toggled via Shift+Tab and /permissions).

Request

Add a field — e.g. permission_mode at the top level — with the current live value:

  • default
  • acceptEdits
  • plan
  • bypassPermissions
  • auto

Why it's useful

  • Operators running long autonomous sessions (e.g. /loop, multi-worktree orchestration) want a persistent visual indicator when they're in bypassPermissions — easy to forget you're in YOLO mode after Shift+Tabbing once.
  • settings.json permissions.defaultMode is readable from disk, but it only reflects the configured default — not the live Shift+Tab state.
  • The docs already state the statusline re-renders on permission-mode changes, so the signal exists internally; it just isn't piped into the payload.

Workaround today

Read defaultMode from ~/.claude/settings.json. Misses runtime toggles — so the statusline will show perm:auto even when the user has cycled into bypassPermissions for the current session.

Environment

  • Claude Code 2.1.117
  • Windows 11, git-bash

extent analysis

TL;DR

Add a permission_mode field to the JSON payload received by the statusline script to display the current permission mode.

Guidance

  • Review the documentation at https://code.claude.com/docs/en/statusline.md to understand the current JSON payload structure and potential limitations.
  • Investigate how the statusline script re-renders on permission-mode changes to determine the best approach for adding the permission_mode field.
  • Consider the trade-offs between reading defaultMode from ~/.claude/settings.json (which may not reflect runtime toggles) and implementing a new solution that accounts for live permission mode changes.
  • Evaluate the feasibility of modifying the statusline script to include the current permission mode in the JSON payload, potentially by tapping into the internal signal that triggers re-renders on permission-mode changes.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The proposed solution relies on modifying the statusline script or the JSON payload it receives, which may require changes to the underlying code or configuration. The workaround of reading defaultMode from ~/.claude/settings.json has limitations, as it does not account for runtime toggles.

Recommendation

Apply a workaround by modifying the statusline script to include the permission_mode field in the JSON payload, as this addresses the core issue and provides a more accurate representation of the current permission mode.

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 Expose current permission mode in statusline JSON [1 participants]