Repository navigation
Description
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.
Activity
simfor99 commentedon Jun 9, 2026
Related existing timing issues:
Worked for ...duration resets/truncates on long turns instead of tracking submit→final continuously #15458 covers finalWorked for ...duration reset/truncation on long turns.This request is complementary: it asks for opt-in host-generated timestamps before visible output blocks, so elapsed wall-clock time remains auditable even when assistant-authored timestamps are stale or wrong.
papastanb commentedon Jul 27, 2026
I strongly support this request. I use several long-running Codex CLI sessions across different projects inside many terminals. When I return to a project, the lack of timestamps makes it difficult to determine when a message, tool call, or action occurred. Host-side timestamps on every visible output block, including tool calls, would significantly improve traceability for multi-project workflows.
rjorgenson commentedon Aug 24, 2026
I wanted this for the same reason: when scrolling through a long TUI transcript, I need to know when each message was sent.
I tested a small implementation against Codex CLI 0.149.0. It adds an opt-in setting:
With the setting enabled, the existing separator renders the user message's local send time on the right:
Codex already records the required value in
Turn.started_atas a Unix timestamp in seconds, so this does not require a session format or protocol change. The implementation passes that value to the turn-completion path, converts it to local time, and adds it toFinalMessageSeparator.A few behavior details from the prototype:
false, preserving the current display.I built and used the patched 0.149.0 binary, and the display works as expected. I also added an
instasnapshot covering the right-aligned timestamp and regeneratedcore/config.schema.jsonfor the new setting.The code change is fairly contained. The main changes are config plumbing, passing
notification.turn.started_atinto the completion handler, and extending the separator renderer. No new dependency is needed because the TUI already depends onchrono.Since the repository does not accept external pull requests, I am posting the implementation notes here in case they are useful to the Codex team.
felix314159 commentedon Aug 27, 2026
yeah please add this, such an obviously useful feature that is still missing for some reason
david-lai-jpg commentedon Sep 8, 2026
This feels like one of those tiny observability features that becomes disproportionately important once Codex is used for long-running autonomous work.
My typical sessions are not 2–5 minute interactive coding bursts. I run
/goalworkflows for many hours, often with subagents, CI checks, deploy verification, waiting states, and multiple repositories involved. When I come back to a session, Codex currently gives me output like:But there is no way to tell whether those events happened 20 seconds apart or whether Codex sat between two of them for three hours.
The current elapsed timer on the active task does not solve this. What matters is historical timing in the transcript:
That immediately answers basic questions like:
This is especially important as Codex moves further toward autonomous, multi-agent, long-duration workflows. At that point timestamps are not cosmetic UI—they are basic execution observability.
What makes this particularly frustrating is that the CLI already knows when events occur and session logs contain timing information. The missing piece is simply rendering an optional host-side timestamp in the TUI.
I understand that every UI feature carries some maintenance cost, but it is genuinely surprising that something this basic is still unavailable in a tool designed to run unattended for hours. Even a simple opt-in config such as:
with
HH:MM:SSlocal-time prefixes would solve the problem.Please consider prioritizing this. The longer Codex sessions become, the more painful the lack of temporal context gets.
ractive commentedon Sep 10, 2026
Adding a concrete use case and display contract from an existing Claude Code setup, checked against Codex CLI 0.153.4.
The desired result is a subtle local-time prefix on each assistant message, including progress updates during long-running work:
The timestamp should be generated by the host/client at the start of the message, with these properties:
HH:MM:SSas a useful default and a configurable date/time format.The terminal styling in the existing setup is:
Claude Code's
MessageDisplayhook makes this possible by returning a modifieddisplayContentonly for the first streamed batch (index == 0), while leaving subsequent deltas unchanged. That setup also permits color and date-format overrides via environment variables.Related: #33420 requests a
MessageDisplayhook. Its proposed observational streaming event would help consumers, but this timestamp use case additionally needs a safe display-only prefix/transformation capability, or an equivalent built-in renderer option. A hook that only observes output would not itself add the prefix.A prompt instruction to print the time is not an equivalent solution: it adds model-authored text to the conversation and does not provide reliable host timing or terminal styling. The practical need is to see when each progress update occurred during a long-running session without inspecting raw logs.
Disclosure: This comment was written and posted by OpenAI Codex at the account owner’s request.
mega-t72 commentedon Nov 16, 2026
Please support optional timestamps before user messages, assistant updates, and tool blocks, using the same recorded timestamps as ~/.codex/sessions, including UTC and millisecond precision. Preserve the original timestamps when resuming or replaying a conversation. This would let users correlate console activity directly with session logs.
A configurable format would let users choose precision, date, brackets, and separators.
Proposed configuration:
Example output:
With chrono syntax, %.3f produces the decimal point plus three millisecond digits; %f represents nanoseconds. Format documentation (https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
I’d define these behaviors:
• Missing or empty format disables timestamps.
• A separate timezone option selects local time or UTC.
• Formatting uses the recorded event timestamp, preserved on resume.
• Prefixes remain display metadata, outside message content.