codex - ๐Ÿ’ก(How to fix) Fix Add handler-level quiet mode for command hooks

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โ€ฆ

Code Example



---

#!/usr/bin/env bash
printf '%s\n' '{
  "systemMessage": "demo hook diagnostic: this should not be printed in chat when quiet",
  "hookSpecificOutput": {
    "hookEventName": "SessionStart",
    "additionalContext": "The model should still receive this hidden demo context."
  }
}'

`chmod +x /tmp/demo-session-hook.sh`

Add a hook entry (e.g. `~/.codex/hooks.json`):

---

Start codex and "trust" the new hook and type a prompt sufficient to trigger a tool:

`>  ls /tmp`

<img width="692" height="359" alt="Image" src="https://github.com/user-attachments/assets/173801da-d2cf-475a-a599-f981c7550f36" />

With hooks that contain many lines of text for context used by the model - this can be many lines rendered onto the screen making it ugly and unrefined. 



### What is the expected behavior?

allow users to set a `silent` flag per hook. I figure opt-in to silence is the right way so that way nothing is concealed by the user, unless they choose it to be so. We already have a 'hook' trust system, that should be sufficient.
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.135.0

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

N/A

Codex doctor report

What issue are you seeing?

Hook messages warning: hook context: and the tool name verbose in the TUI which leads to a cluttered view , with no option to opt-in or out.

What steps can reproduce the bug?

Create /tmp/demo-session-hook.sh:

#!/usr/bin/env bash
printf '%s\n' '{
  "systemMessage": "demo hook diagnostic: this should not be printed in chat when quiet",
  "hookSpecificOutput": {
    "hookEventName": "SessionStart",
    "additionalContext": "The model should still receive this hidden demo context."
  }
}'

`chmod +x /tmp/demo-session-hook.sh`

Add a hook entry (e.g. `~/.codex/hooks.json`):

```json
{
    "hooks": {
      "PreToolUse": [
        {
          "hooks": [
            {
              "type": "command",
              "command": "/tmp/demo-session-hook.sh"
            }
          ]
        }
      ]
    }
}

Start codex and "trust" the new hook and type a prompt sufficient to trigger a tool:

> ls /tmp

<img width="692" height="359" alt="Image" src="https://github.com/user-attachments/assets/173801da-d2cf-475a-a599-f981c7550f36" />

With hooks that contain many lines of text for context used by the model - this can be many lines rendered onto the screen making it ugly and unrefined.

What is the expected behavior?

allow users to set a silent flag per hook. I figure opt-in to silence is the right way so that way nothing is concealed by the user, unless they choose it to be so. We already have a 'hook' trust system, that should be sufficient.

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "some-hook.sh",
            "silent": true
          }
        ]
      }
    ]
  }
}

Additional information

Happy to make a PR, I have this fixed in a local branch. We have a codex plugin for nono, but get many reports from users who are frustrated with the lack of hook logging control in the plugin: https://registry.nono.sh/packages/always-further/codex

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

codex - ๐Ÿ’ก(How to fix) Fix Add handler-level quiet mode for command hooks