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: 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.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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.