[BUG] Server-managed `allowManagedHooksOnly: true` silently disables custom statusLine (contradicts docs)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 12, 2026

Environment

  • Claude Code v2.1.228 (native installer), Windows 11 Enterprise 10.0.26200
  • Terminal CLI (not desktop app), Git Bash at non-default path

(CLAUDE_CODE_GIT_BASH_PATH set in settings env)

  • Org server-managed settings via claude.ai Admin Settings → Claude Code →

Managed settings (synced to ~/.claude/remote-settings.json)

Summary

A custom statusLine command is never executed while server-managed settings
contain allowManagedHooksOnly: true — even when the managed settings define
no hooks and no plugins. Per the docs, only disableAllHooks is supposed to
disable the status line:

"If disableAllHooks is set to true in your settings, the status line is also disabled." — https://code.claude.com/docs/en/statusline.md#troubleshooting

allowManagedHooksOnly is documented as only blocking user/project/plugin
hooks. Nothing states it affects statusLine, yet it does.

Repro

  1. User settings (~/.claude/settings.json):

``json
"statusLine": { "type": "command", "command": "~/.claude/statusline-command.sh" }
``
Script verified working: valid single-line ANSI output, exit 0, when run
manually via Git Bash (including with a stripped environment).

  1. Org managed settings: { "allowManagedHooksOnly": true } (nothing else).
  2. Start claude in a terminal.
  3. Status line never appears. Instrumentation inside the script (append to a

log file on every invocation) confirms the command is never spawned during
an entire interactive session.

  1. Remove all managed settings (empty managed settings JSON), wait for sync /

restart → status line renders immediately, no other changes.

Evidence

claude --debug with allowManagedHooksOnly active: a full 471-line
startup+turn log contains zero statusline-related lines — no spawn
attempt, no error, no warning. Settings load cleanly, and the policy itself
is applied as expected:

[DEBUG] Skipping plugin hooks - allowManagedHooksOnly is enabled and no managed plugins
[DEBUG] Hooks: Found 0 total hooks in registry

The suppression is completely silent: nothing in --debug, /doctor, or the
UI indicates the statusLine was blocked by policy.

Expected

Either:

  • allowManagedHooksOnly does not affect statusLine (matching current

docs) — preferred, since it forces admins to choose between hook
governance and letting users keep status lines; or

  • the docs state that it does, AND the suppression is surfaced (debug log

line + /doctor note) instead of failing silently.

Impact

Org admins who replace disableAllHooks with the more permissive
allowManagedHooksOnly (specifically so users keep their status lines)
still break statusLine for every user org-wide, with no diagnostic anywhere.
Cost us several hours ruling out script, PATH, shell detection, and known
Windows statusline regressions (#66455, #31670, #27161) before isolating it
by removing managed settings entirely.

Only tested on Windows / v2.1.228; other platforms unverified.

View original on GitHub ↗