codex - 💡(How to fix) Fix Allow hook additionalContext to be model-visible but hidden from TUI [1 pull requests]

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…

Root Cause

Temporal awareness is not just decorative. It materially improves Codex's usefulness in real operational workflows:

  • Production deploys and rollbacks
  • Kubernetes/log/queue investigations
  • CI and release verification
  • Browser QA flows where order and waiting matter
  • Long-running tool-heavy debugging sessions

CodeNow is a concrete working use case: https://github.com/bdteo/code-now

It would be great if Codex could support this class of hook cleanly: always available to the model, unobtrusive to the human operator.

Fix Action

Fixed

Code Example

PostToolUse hook (completed)
  hook context: [11:03:04] mcp__atme__search_mentions completed
RAW_BUFFERClick to expand / collapse

Problem

Codex hooks are extremely useful for temporal awareness, but the TUI currently renders every hook context entry that is injected into the model. This makes it hard to use hooks for high-value background context without also filling the visible transcript with hook cards.

Concrete example: bdteo/code-now is a small temporal-awareness plugin for Claude Code and Codex. It injects precise current time / elapsed-time context on events such as SessionStart, UserPromptSubmit, and PostToolUse.

That context is genuinely useful. In ops, DevOps, incident response, and QA work, timing often changes the answer:

  • Did this deploy finish before or after the failed request?
  • How long has a queue/pod/test run been stuck?
  • Did a verification happen immediately after a change or several minutes later?
  • Are we looking at fresh logs, stale logs, or a tool result from earlier in a long turn?
  • In QA, did a save/reload/wait happen in the intended sequence, or did timing make the result ambiguous?

So this is not a request to disable hooks or hide "noise" by losing the context. The hook output is valuable to the model. The issue is that model-visible temporal context and user-visible TUI history are currently coupled.

Current behavior

If a hook emits additionalContext, Codex injects useful context into the session, but the TUI also renders a persistent completed hook card such as:

PostToolUse hook (completed)
  hook context: [11:03:04] mcp__atme__search_mentions completed

This is especially visible with PostToolUse, because a long ops/QA turn may call many tools. The result is a transcript full of hook cards even though the user usually only needs the hook context to guide the model.

The current TUI code already has a good concept of "quiet successful hooks": fast hooks with no output can disappear. But a hook that emits context has output entries, so it becomes persistent history.

Related prior issue: #15497 discussed suppressing hook status messages in the TUI. This request is slightly different: keep hook context model-visible while allowing it to be TUI-hidden.

Desired behavior

Please add a supported way for hook authors/users to say:

inject this hook output into the model/session context, but do not render it as a TUI transcript/history card.

Possible designs:

  1. Honor suppressOutput: true for TUI rendering while still recording additionalContext for the model.
  2. Add a hook output field such as visibility: "model" / display: "hidden" / tuiVisible: false.
  3. Add a hook config option such as hideInTui: true per hook handler.
  4. Add a global TUI setting such as tui.hide_hook_context = true, ideally with per-hook override support.

The important semantic distinction is:

  • additionalContext: should still affect the model.
  • TUI rendering: should be optional.

Why this matters

Temporal awareness is not just decorative. It materially improves Codex's usefulness in real operational workflows:

  • Production deploys and rollbacks
  • Kubernetes/log/queue investigations
  • CI and release verification
  • Browser QA flows where order and waiting matter
  • Long-running tool-heavy debugging sessions

CodeNow is a concrete working use case: https://github.com/bdteo/code-now

It would be great if Codex could support this class of hook cleanly: always available to the model, unobtrusive to the human operator.

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 Allow hook additionalContext to be model-visible but hidden from TUI [1 pull requests]