Skip to content

[#32]: Compat audit for Codex v0.129.0 persist_extended_history disabled#43

Open
delexw wants to merge 1 commit intomainfrom
fix-issue-32
Open

[#32]: Compat audit for Codex v0.129.0 persist_extended_history disabled#43
delexw wants to merge 1 commit intomainfrom
fix-issue-32

Conversation

@delexw
Copy link
Copy Markdown
Contributor

@delexw delexw commented May 10, 2026

Summary

Fixes #32

Codex v0.129.0 (PRs #20502/#20682) disables persist_extended_history and enforces an always-limited thread history window at the app-server level. The issue raised concern that codex-trace might silently drop turns for long sessions.

Audit Finding

codex-trace is unaffected by this change. The tool reads JSONL session files from disk (~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl) — it never connects to the Codex app-server or fetches history from it. All events written to the rollout file are captured regardless of what the app-server returned to the Codex CLI.

When Codex CLI hits the limited history window, it writes a compacted entry into the JSONL session file. codex-trace already handles this via has_compaction on CodexTurn, and the UI surfaces it as "Context was compacted in this turn." No turns are silently dropped and no reconstruction logic assumes full history from the app-server.

The "rollout-file fallback" suggested in the issue is already the primary and only data source.

Changes

src-tauri/src/parser/turn.rs

Added regression test v0129_persist_extended_history_disabled_all_turns_captured_compaction_flagged that:

  • Builds a 3-turn session (simulating a v0.129.0 long session) with a compacted entry inside turn 3
  • Verifies all three turns are present in the parsed output (no silent truncation)
  • Verifies has_compaction is correctly set on turn 3 (the turn containing the compacted entry)
  • Verifies turns 1 and 2 are unaffected by the compaction event

Testing

cargo test --lib  →  60 passed, 0 failed
npx vitest run    →  122 passed, 0 failed
cargo clippy      →  0 warnings
cargo fmt --check →  all files correctly formatted

Codex v0.129.0 (PRs #20502/#20682) disables persist_extended_history
and enforces always-limited thread history at the app-server level.

codex-trace is unaffected: it reads JSONL session files from disk
and never fetches history from the app-server, so all turns remain
visible regardless of the server-side history window size.

When Codex CLI hits the limited window it writes a 'compacted' entry
into the session file. codex-trace already handles this via
has_compaction, and the new regression test proves:
- all turns are captured (no silent truncation)
- compacted entries are correctly attributed to the turn in which
  they appear

Fixes #32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compat] Codex v0.129.0: thread history now always limited (persist_extended_history disabled)

1 participant