tui: suppress hook notifications when there is nothing to display

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

Hooks that run silently in the background (no status_message, no output entries) currently add two lines to the chat history on every invocation:

• Running UserPromptSubmit hook

UserPromptSubmit hook (completed)

This clutters the TUI for integrations that use hooks purely for telemetry or event forwarding (e.g. forwarding hook events over a socket to an external daemon). A single user prompt can produce 4+ lines of hook status that carry zero information.

Suggested fix (in codex-rs/tui/src/chatwidget.rs):

  • on_hook_started: skip add_to_history when status_message is None or empty.
  • on_hook_completed: skip add_to_history when entries is empty and status is Completed. Failed/blocked/stopped hooks should still be shown.

Hooks that provide a status_message or produce entries would render exactly as before.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 4 months ago

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

  • #15497

Powered by Codex Action

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.