Summary
Hooks that succeed silently (exit code 0, no stdout) still produce a 3-line progress block in the TUI for PreToolUse, PostToolUse, Stop, and SubagentStop events. For users running multiple hooks per tool call, this produces 12-18 lines of progress blocks per invocation -- 360-900 lines of noise in a typical session.
Current behavior
Every hook execution on PreToolUse/PostToolUse/Stop/SubagentStop renders:
Hooks PostToolUse → Grep
└─ Execute ~/.local/bin/agent-hooks audit-log
└─ Result : Exit code: 0
The suppressOutput JSON field only hides stdout content from transcript mode -- it does not suppress the hook runner's progress display.
Proposed behavior
Add a "silent": true option to hook registrations:
{
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "~/.local/bin/agent-hooks audit-log",
"timeout": 3,
"silent": true
}
]
}
]
}
}
When silent: true:
• Hook exits 0 with no stdout/stderr: show nothing in the TUI
• Hook exits non-zero or produces stderr: show the progress block as normal
• Debug mode (--debug): always show full progress regardless of silent
Alternative: global toggle
{
"hookProgressDisplay": "errors-only" | "always"
}
Default always. errors-only hides progress for hooks that exit 0 with no output.
Use case
Most hooks are infrastructure -- audit logging, state tracking, background formatting. They succeed silently 99% of the time.
A silent option keeps the safety net (hooks still run, failures still surface) while eliminating TUI noise.
Prior art
• anthropics/claude-code#9340 (anthropics/claude-code#9340) -- --quiet flag for tool output suppression. Open, 20+ +1s.
• anthropics/claude-code#39499 (anthropics/claude-code#39499) -- "silent": true on hook JSON for Stop hooks. Closed (not_planned), stale.
• anthropics/claude-code#16051 (anthropics/claude-code#16051) -- Hooks show "error" label even on success. Closed (not_planned).
Summary
Hooks that succeed silently (exit code 0, no stdout) still produce a 3-line progress block in the TUI for PreToolUse, PostToolUse, Stop, and SubagentStop events. For users running multiple hooks per tool call, this produces 12-18 lines of progress blocks per invocation -- 360-900 lines of noise in a typical session.
Current behavior
Every hook execution on PreToolUse/PostToolUse/Stop/SubagentStop renders:
The suppressOutput JSON field only hides stdout content from transcript mode -- it does not suppress the hook runner's progress display.
Proposed behavior
Add a "silent": true option to hook registrations:
{ "hooks": { "PostToolUse": [ { "matcher": "*", "hooks": [ { "type": "command", "command": "~/.local/bin/agent-hooks audit-log", "timeout": 3, "silent": true } ] } ] } }When silent: true:
• Hook exits 0 with no stdout/stderr: show nothing in the TUI
• Hook exits non-zero or produces stderr: show the progress block as normal
• Debug mode (--debug): always show full progress regardless of silent
Alternative: global toggle
{ "hookProgressDisplay": "errors-only" | "always" }Default always. errors-only hides progress for hooks that exit 0 with no output.
Use case
Most hooks are infrastructure -- audit logging, state tracking, background formatting. They succeed silently 99% of the time.
A silent option keeps the safety net (hooks still run, failures still surface) while eliminating TUI noise.
Prior art
• anthropics/claude-code#9340 (anthropics/claude-code#9340) -- --quiet flag for tool output suppression. Open, 20+ +1s.
• anthropics/claude-code#39499 (anthropics/claude-code#39499) -- "silent": true on hook JSON for Stop hooks. Closed (not_planned), stale.
• anthropics/claude-code#16051 (anthropics/claude-code#16051) -- Hooks show "error" label even on success. Closed (not_planned).