codex - 💡(How to fix) Fix Codex app can freeze with very large rollout/history JSONL files

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Component

Codex desktop app

What happened?

When a Codex conversation runs for a long time, the local rollout/history JSONL file can grow to hundreds of MB. I have several sessions that are around 500 MB or larger.

When I continue working with those long-running sessions in the Codex desktop app, the app can freeze for a noticeable amount of time, especially when sending a new prompt.

I suspect the hot path may be doing too much work over the full session history file, or otherwise synchronously processing more of the rollout/history than is needed for the current UI action.

Expected behavior

Continuing a long-running session should remain responsive even if the persisted history file is very large.

Sending a new prompt should not require the app UI to block on reading/parsing/processing the entire history file.

Steps / observed workflow

  1. Use the same Codex conversation for a long-running development workflow across many turns.
  2. Let the local rollout/history JSONL file grow very large. In my case I have multiple session files around 500 MB or larger.
  3. Open or continue that existing conversation in the Codex desktop app.
  4. Send a new prompt.
  5. Observe that the app can become temporarily unresponsive before it continues.

Possible direction

I built a local helper/web prototype that works around this while keeping Codex's original files untouched:

  • index session summaries and recent user/assistant messages into local SQLite;
  • serve the session list from SQLite instead of parsing large rollout files in the request path;
  • for active sessions, read only a bounded head/tail window;
  • lazy-load heavy technical records such as tool output, command output, and event records only when opened;
  • keep the original JSONL files unchanged so CLI/app compatibility is preserved.

This made the remote UI stay responsive even with very large session files.

I think Codex could either change the long-term session storage model, or, if JSONL needs to remain for compatibility/legacy/architecture reasons, keep the current format but add an indexed/cache-backed read path for summaries, recent messages, and lazy technical output.

Environment

  • Primarily observed with Codex desktop app on Windows.
  • Related investigation also done from macOS.
  • Exact Codex app version / OS build / hardware details can be provided if useful.

Related discussion

https://github.com/openai/codex/discussions/22987

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Continuing a long-running session should remain responsive even if the persisted history file is very large.

Sending a new prompt should not require the app UI to block on reading/parsing/processing the entire history file.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING