claude-code - 💡(How to fix) Fix Custom statusLine is hidden when in plan or bypassPermissions mode [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#52510Fetched 2026-04-24 06:05:15
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1
RAW_BUFFERClick to expand / collapse

What

When I Shift+Tab into plan or bypassPermissions mode, the mode banner (blue "plan mode on" / red "bypass permissions on") replaces my custom statusLine output. The statusline stays hidden for the entire time I'm in that mode — not just during the brief permission prompt flash mentioned in the docs.

Why it matters

My statusline shows model, context usage, branch, task ID, and cost — info I want visible all the time, not just in default mode. I regularly cycle bypass → plan → bypass for planning then execution, and I lose the statusline each hop.

Proposal

Render the mode badge alongside the custom statusline rather than replacing it. A compact prefix like [PLAN] <statusline output> or a second line would preserve both signals.

Alternatively, expose permission_mode in the statusLine stdin JSON so user scripts can self-render the badge and keep full control of the line.

Environment

  • Claude Code CLI, macOS
  • Config: defaultMode: bypassPermissions, custom statusLine command

extent analysis

TL;DR

Render the mode badge alongside the custom statusline by modifying the statusLine command to include the mode indicator.

Guidance

  • Check the Claude Code CLI documentation for any existing options to customize the mode banner behavior.
  • Modify the custom statusLine command to include a conditional statement that checks the current mode and appends the corresponding badge (e.g., [PLAN] or [BYPASS]) to the statusline output.
  • Consider using a second line for the mode badge to preserve the original statusline format.
  • Test the modified statusLine command in different modes to ensure the badge is displayed correctly and the statusline remains visible.

Example

# Example statusLine command modification
if [ "$permission_mode" = "plan" ]; then
  echo "[PLAN] $statusline_output"
elif [ "$permission_mode" = "bypassPermissions" ]; then
  echo "[BYPASS] $statusline_output"
else
  echo "$statusline_output"
fi

Notes

The proposed solution assumes that the permission_mode variable is available in the environment where the statusLine command is executed. If this variable is not available, an alternative approach may be needed.

Recommendation

Apply workaround: Modify the statusLine command to include the mode badge, as this approach allows for a flexible and customizable solution that meets the user's requirements.

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 Custom statusLine is hidden when in plan or bypassPermissions mode [1 comments, 2 participants]