Add hook_report_level config to suppress routine hook chatter

Resolved 💬 3 comments Opened Apr 8, 2026 by xsyetopz Closed Apr 8, 2026

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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗