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: skipadd_to_historywhenstatus_messageisNoneor empty.on_hook_completed: skipadd_to_historywhenentriesis empty and status isCompleted. Failed/blocked/stopped hooks should still be shown.
Hooks that provide a status_message or produce entries would render exactly as before.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗