codex - 💡(How to fix) Fix Add hook_report_level config to suppress routine hook chatter [2 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
openai/codex#17105Fetched 2026-04-09 08:02:20
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2closed ×1mentioned ×1

Error Message

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)
RAW_BUFFERClick to expand / collapse

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).

extent analysis

TL;DR

Add a hook_report_level config knob to control the verbosity of hook notifications, allowing users to suppress non-actionable output.

Guidance

  • Review the proposed hook_report_level config options (off, error, warn, all) to determine which level best suits your needs.
  • Test the warn default setting to see if it effectively suppresses unnecessary notifications, such as HookStarted and empty completed hook blocks.
  • Consider trying the error setting to only show hook completions when the status is failed, blocked, or stopped.
  • Evaluate the implementation in the xsyetopz:fix/hook-report-level fork branch and commit a8133b308 to ensure it meets your requirements.

Example

No explicit code example is provided, but the proposed hook_report_level config knob can be used as follows:

hook_report_level = "warn"

This would suppress HookStarted notifications and drop context entries, while still showing error and warning messages.

Notes

The proposed solution only filters user-facing hook notifications and does not affect the execution of hooks or the injection of additional context into the model prompt.

Recommendation

Apply the workaround by adding the hook_report_level config knob and setting it to the desired level (e.g., warn or error), as this allows for more control over the verbosity of hook notifications.

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