tui: suppress hook notifications when there is nothing to display

Resolved 💬 2 comments Opened Apr 7, 2026 by blueberrycongee Closed Apr 7, 2026

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 ↗

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