-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Open
Labels
enhancementNew feature or requestNew feature or requestexecIssues related to the `codex exec` subcommandIssues related to the `codex exec` subcommand
Description
Feature request
When consuming codex exec --json, there is no session creation timestamp in the JSONL stream. If a client cannot process the full stream (or processes it asynchronously), it is hard to later reconcile and synchronize sessions by time across the JSONL rollout files. I need a stable session timestamp so I can query “changes since X” reliably.
Proposed behavior
Emit the session start timestamp (RFC3339, UTC) in the JSON stream as part of the initial thread.started event. Ideally this is the same “locked” timestamp written into the rollout file’s SessionMeta.timestamp and remains stable across resumes.
Example (new field):
{"type":"thread.started","thread_id":"<uuid>","timestamp":"2025-09-05T16:53:11.850Z"}Rationale
- Enables offline/partial stream processing and later synchronization.
- Allows clients to correlate the exec stream with stored JSONL sessions using the canonical session timestamp.
- Avoids relying on event arrival time, which is not stable across resumptions.
Notes
- For resumed sessions, the timestamp should come from the existing rollout
SessionMeta(not a new clock value). - The format can match the existing rollout
SessionMeta.timestampRFC3339 format.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestexecIssues related to the `codex exec` subcommandIssues related to the `codex exec` subcommand