claude-code - 💡(How to fix) Fix Expose activePermissionMode in statusline stdin JSON payload [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#46375Fetched 2026-04-11 06:21:57
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×3cross-referenced ×2commented ×1

Root Cause

This means no statusline tool can show whether the user is in default, acceptEdits, plan, or bypassPermissions mode. I surveyed 8 popular statusline projects on GitHub — none of them can display the permission mode because it's simply not exposed.

Code Example

{
  "session_id": "...",
  "model": { "id": "claude-sonnet-4-6", "display_name": "Sonnet 4.6" },
  "permission_mode": "acceptEdits",
  ...
}
RAW_BUFFERClick to expand / collapse

Is your feature request related to a problem?

The statusline stdin JSON payload includes model, rate_limits, context_window, cost, output_style, and version — but not the current permission mode.

This means no statusline tool can show whether the user is in default, acceptEdits, plan, or bypassPermissions mode. I surveyed 8 popular statusline projects on GitHub — none of them can display the permission mode because it's simply not exposed.

The transcript JSONL logs an initial permission-mode entry at session start, but Shift+Tab mode changes are not appended to the transcript, so reading the transcript only gives the startup mode.

Describe the solution you'd like

Add activePermissionMode (or permission_mode) to the JSON object piped via stdin to statusLine.command:

{
  "session_id": "...",
  "model": { "id": "claude-sonnet-4-6", "display_name": "Sonnet 4.6" },
  "permission_mode": "acceptEdits",
  ...
}

This field should reflect the current runtime mode, updating when the user presses Shift+Tab — not just the startup mode.

Ideally, also append a new {"type": "permission-mode", "permissionMode": "..."} line to the session transcript JSONL on every Shift+Tab change (currently only the initial mode is logged).

Prior issues

  • #4719 — requested for PreToolUse hooks (closed by inactivity bot, not implemented)
  • #6227 — requested for hooks + statusline (closed as duplicate of #4719, also by inactivity bot)
  • #16494 — also closed as duplicate

This has been requested multiple times and keeps getting auto-closed. The feature gap is real — every statusline author would benefit from this.

Additional context

  • Claude Code version: 2.1.100
  • Current stdin keys: session_id, transcript_path, cwd, model, workspace, version, output_style, cost, context_window, exceeds_200k_tokens, rate_limits
  • Also useful: expose permission_mode in hook payloads (PreToolUse, PostToolUse, Notification, etc.)

extent analysis

TL;DR

Add an activePermissionMode field to the JSON object piped via stdin to statusLine.command to reflect the current runtime mode.

Guidance

  • To address the issue, update the JSON payload to include the activePermissionMode or permission_mode field, which should be updated when the user presses Shift+Tab.
  • The permission_mode field should reflect the current runtime mode, not just the startup mode.
  • Consider appending a new {"type": "permission-mode", "permissionMode": "..."} line to the session transcript JSONL on every Shift+Tab change to maintain a record of mode changes.
  • Exposing permission_mode in hook payloads (PreToolUse, PostToolUse, Notification, etc.) could also be beneficial for statusline authors.

Example

{
  "session_id": "...",
  "model": { "id": "claude-sonnet-4-6", "display_name": "Sonnet 4.6" },
  "permission_mode": "acceptEdits",
  ...
}

Notes

The proposed solution requires updates to the JSON payload and potentially the session transcript JSONL. The exact implementation details may depend on the specific requirements and constraints of the Claude Code version 2.1.100.

Recommendation

Apply the workaround by adding the activePermissionMode field to the JSON object piped via stdin to statusLine.command, as this directly addresses the feature gap and provides the necessary information for statusline tools to display 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