Add hook_report_level config to suppress routine hook chatter

Resolved 💬 3 comments Opened Apr 8, 2026 by xsyetopz Closed Apr 8, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Problem

Codex hook notifications currently surface routine, non-actionable output like:

  • “Running PreToolUse hook”
  • “PreToolUse hook (completed)”
  • “hook context: …” (from hook additionalContext)

This creates noise even when there are no warnings/errors/stops/blocks.

Proposed change

Add a config knob to control hook reporting without disabling hook execution:

hook_report_level = "off" | "error" | "warn" | "all"

  • warn (default): suppress HookStarted; drop context entries; suppress empty “completed” hook blocks
  • error: only show hook completions when status is failed/blocked/stopped (and only error/stop/feedback entries)
  • all: legacy behavior
  • off: emit nothing user-facing

Implementation (prototyped on a fork)

Fork branch: xsyetopz:fix/hook-report-level
Commit: a8133b308

Notes:

  • This only filters user-facing hook started/completed notifications.
  • It does not change whether hooks run, nor whether hook-provided additional context is injected into the model prompt.

Meta

This issue was opened with OpenAI Codex while working in a fork.
Any subsequent responses / iteration will be posted directly by the fork maintainer (@xsyetopz).

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #15497
  • #16993
  • #16743

Powered by Codex Action

xsyetopz · 4 months ago
Potential duplicates detected. Please review them and close your issue if it is a duplicate. Support suppressing hook status messages in TUI (suppressOutput is a no-op) #15497 tui: suppress hook notifications when there is nothing to display #16993 * Hooks log output is very noisy #16743 _Powered by Codex Action_

Issue #15497 does not seem to provide specific config values to alter per user's own needs.
Issues #16993 && #16743 were closed as duplicates of #15497 && #16417 respectively.

oxysoft · 3 months ago

Indexed this hook ticket in the umbrella tracker: #21753

Goal: collect the scattered Codex hook requests and bugs into one parity matrix for Full Claude Code Hook Parity (29+), while preserving this issue as the detailed thread for its specific behavior.