Add optional host-side timestamps before every output block in Codex CLI

Open 💬 1 comment Opened Jun 9, 2026 by simfor99

What variant of Codex are you using?

Codex CLI / Codex in terminal, running in WSL on Linux.

What feature would you like to see?

Please add an optional mode that prefixes every visible output block with the local host-side timestamp generated by the Codex UI/CLI layer, not by the model.

For example:

[2026-06-09 17:38:12 CEST] assistant update ...
[2026-06-09 17:38:40 CEST] tool call started ...
[2026-06-09 17:39:03 CEST] tool output ...
[2026-06-09 17:39:20 CEST] assistant update ...

Ideally this would be configurable, e.g. a CLI flag or config option such as:

show_output_block_timestamps = true
timestamp_source = "host"
timestamp_format = "%Y-%m-%d %H:%M:%S %Z"

The key point is that the timestamp should come from the Codex client process / host clock, not from assistant text generation.

Why this matters

Agents do not have a reliable internal sense of wall-clock time. Even with explicit AGENTS.md instructions telling the agent to run date before any visible timestamp, assistant messages can still display incorrect times after long turns, context compaction, resume, or UI replay.

In one real session, the visible assistant output jumped to 18:31, 18:32, 18:33, 18:35, and 18:37, while the actual local system time checked via shell was around 17:38-17:39 CEST. From the user perspective, the transcript made it look as if ~37 minutes had passed, when only about 10 minutes had passed.

This makes long-running agent work hard to supervise:

  • The user cannot tell how much real time elapsed between output blocks.
  • The agent may accidentally present fabricated or stale timestamps as status evidence.
  • Context compaction/resume can make prior timestamps look authoritative even when they are not.
  • The existing final "Worked for ..." line is useful but not enough to reconstruct timing across multiple assistant updates, tool blocks, compaction, or resumed turns.

Proposed behavior

Add a display-layer timestamp mode where Codex annotates output blocks itself. This should be treated like terminal/UI metadata, similar to log timestamps, not as assistant-authored content.

Suggested scope:

  • Prefix assistant output blocks.
  • Prefix tool call start/end or tool output blocks where feasible.
  • Preserve timestamps through transcript replay/export.
  • Make the mode opt-in to avoid visual noise for users who do not want it.
  • Consider also showing monotonic elapsed time since user submit, e.g. +00:02:31, next to wall-clock time.

Relationship to existing timing requests

This is related to #24240, but different: #24240 asks for user-side timing metrics between turns. This request is specifically for host-generated timestamps before each visible output block so users can audit elapsed time during one long agent action and after compaction/resume.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗