claude-code - 💡(How to fix) Fix [Feature Request] Add statusline customization setting for managed hook environments [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#56380Fetched 2026-05-06 06:29:39
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Root Cause

Bug Description When managed settings allow only managed hooks, it's impossible to set a custom statusline, because all script executions are blocked. Suggest there should be a separate statusline setting in settings.json, which either allows custom statuslines explicitly, or allows certain script paths.

RAW_BUFFERClick to expand / collapse

Bug Description When managed settings allow only managed hooks, it's impossible to set a custom statusline, because all script executions are blocked. Suggest there should be a separate statusline setting in settings.json, which either allows custom statuslines explicitly, or allows certain script paths.

allowManagedHooksOnly is a very useful setting for a proper security posture (albeit a bit clunky), so turning it off just for the sake of having statuslines seems unreasonable. But it also seems unreasonable that statusline is tied to hooks in the first place.

Environment Info

  • Platform: linux
  • Terminal: kitty
  • Version: 2.1.119
  • Feedback ID: 71b5ef71-899c-4cd9-883d-081957088bd6

Ways to reproduce

  1. Specify {"allowManagedHooksOnly": true} in managed settings.
  2. Attempt to specify a statusline in the local settings.json.
  3. Verify that the statusline script is never executed
  4. Set {"allowManagedHooksOnly": false} in managed settings.
  5. Observe the statusline working now.

extent analysis

TL;DR

Consider adding a separate statusline setting in settings.json to allow custom statuslines while keeping allowManagedHooksOnly enabled.

Guidance

  • Review the current implementation of allowManagedHooksOnly to understand how it blocks script executions, including statusline scripts.
  • Investigate the possibility of introducing a new setting that explicitly allows custom statuslines, such as allowCustomStatusline.
  • Evaluate the security implications of allowing certain script paths for statuslines while keeping allowManagedHooksOnly enabled.
  • Consider the trade-offs of turning off allowManagedHooksOnly solely for the purpose of enabling custom statuslines.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The solution may require changes to the underlying settings management system and should be carefully evaluated to ensure it does not introduce security vulnerabilities.

Recommendation

Apply workaround: Introduce a separate statusline setting to allow custom statuslines while maintaining the security benefits of allowManagedHooksOnly. This approach balances security posture with the need for customizable statuslines.

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 [Feature Request] Add statusline customization setting for managed hook environments [1 comments, 2 participants]