/side, /fork, backtrack in very long sessions are linearly-in-jsonl slow

Resolved 💬 2 comments Opened Apr 24, 2026 by qdbp Closed Apr 24, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.124

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

Linux 6.19.11-arch1-1 x86_64 unknown

What terminal emulator and version are you using (if applicable)?

alacritty 0.17.0 (94e7c887)

What issue are you seeing?

I hate resetting my sessions so I'm at about 15 billion tokens now.

/fork and /side now take about ~30 seconds. I assume some linear scan of the jsonl is happening, but this file is 1.5 GiB now and most of it is useless. Ctrl+L clears do not help with this.

There should perhaps be lookback limits to any operation that would otherwise scan the whole jsonl.

jsonl trimming also seems sensible. The reason I keep indefinite sessions is because a lot of implicit understanding gets baked deep into the context by your (amazing, I must add) compaction, and a cold reset always hurts -- but I don't care about preserving the infinite jsonl (or, in a perfect world, the truncated bit would be zstd+logrotated). Some sort of (auto) /trim would do wonders here.

What steps can reproduce the bug?

Have a very long session (3B+ to be noticeable) and do anything like /side, /fork or esc-esc rewind.

What is the expected behavior?

These operations are snappy.

Additional information

019db0a9-e8d4-70f1-9dd4-312efe80bcde

View original on GitHub ↗

2 Comments

qdbp · 4 months ago

I was an idiot, I can just change the history length.

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #18839
  • #18693
  • #19116

Powered by Codex Action