Repository navigation
Open
Labels
enhancementNew feature or request
Description
What variant of Codex are you using?
CLI
What feature would you like to see?
Ask
Introduce a small, versioned export surface for persisted session actions.
Goal:
- Given a persisted session → return an ordered list of actions
- Make it a documented, stable contract for external tools
- Restrict V1 to data already persisted and reconstructible
Why
Codex already persists and reconstructs session history, but no surface is clearly defined as a stable contract.
This blocks tooling for questions like:
- What commands ran?
- What file changes occurred?
- What tool calls happened, and in what order?
- What can be safely replayed or inspected?
Rationale
A stable, versioned projection over persisted actions provides:
- a minimal reproducibility surface
- a safer alternative to depending on internal rollout formats
- a foundation for future debugging / incident tooling
Routing question
Where should this live?
- app-server (
thread/readextension?) - rollout layer (as backing projection)
- other surface if preferred
Additional information
Proposal
Expose a stable projection over persisted session history.
Possible entry points:
- CLI: export actions from a session
- API: return versioned action stream
- Extension of
thread/readwith a documented projection
Prefer: a projection layer over existing persisted data (not raw rollout JSONL).
Example schema (V1)
session_idturn_idtimestampaction_typetool_namecommandchanged_pathsstatus
Non-goals
- No reasoning or chain-of-thought
- No raw prompts by default
- No dashboards or analytics
- No new logging system if existing persistence suffices
- No full forensic completeness
Suggested V1 scope
Keep deliberately narrow:
- opt-in
- completed actions only
- minimal schema
- explicitly versioned
- derived from persisted session data
Likely includes:
- completed command executions
- completed file changes
- completed tool calls
- durable turn/session markers
Excludes:
- begin/request/delta events
- approval flows
- realtime ephemeral notifications
Grounding in current implementation
This proposal builds on existing behavior:
- Rollouts are persisted and replayable
- Persisted history is loaded into
InitialHistory thread/read+includeTurnsreturns stored historypersistExtendedHistoryexists (without backfill guarantees)- Rollout items are already projected into turns
At the same time:
- Persistence is selective (only certain “end” events)
- Many events are intentionally not persisted
- Realtime notifications are explicitly ephemeral
- Stored outputs are already sanitized/truncated
Preference:
- avoid making rollout JSONL the public contract
- avoid relying on OTEL as the primary user-facing interface
- expose a stable projection over persisted session history
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
Mahkhmood9 commentedon Apr 20, 2026
Mahkhmood9 commentedon Apr 20, 2026
etraut-openai commentedon Apr 20, 2026
@Mahkhmood9, please stop spamming our issue tracker.
Mahkhmood9 commentedon Apr 20, 2026
jazzyalex commentedon Apr 26, 2026
Adding one downstream-tool perspective from Agent Sessions, which reads local Codex session history for search, transcript browsing, resume workflows, and subagent hierarchy display.
The most useful contract for external tools would be a versioned projection over persisted history, not the raw rollout JSONL shape. In practice, the hard part is distinguishing:
A small V1 projection would already help if it exposed stable identifiers and ordering:
session_idturn_idtimestampaction_typetool_namestatuscwdchanged_pathsparent_session_id/child_session_idedges for subagentsI would keep prompt text and reasoning out of V1 by default. For local history tools, the highest-value data is usually action ordering, durable status, cwd/path identity, and lineage. That is enough to answer "what happened in this session?", "which subprocess changed this file?", and "can this session be resumed safely?" without making internal rollout files a public API.
Project for context: https://github.com/jazzyalex/agent-sessions
blain3white commentedon Jun 9, 2026
This overlaps with what I'm building in Clean My Agent — a local desktop app that reads Codex session JSONLs and exports structured session data. I'd be happy to compare notes if a stable external surface gets defined.
Necmttn commentedon Jun 21, 2026
A useful V1 action export should be based on stable action ids and source offsets, not rendered transcript text.
Minimum fields: schema version, session id, turn id, action id, parent action id, action kind, tool_call id, cwd, command/args, exit status, files touched, timestamps, redaction flags, and source JSONL byte range.
That gives downstream tools reproducibility without depending on private rollout shapes.
Generated with ax.