`codex resume/resume --all` slow to load, no loading indicator

Resolved 💬 7 comments Opened Nov 20, 2025 by riordant Closed Apr 5, 2026
💡 Likely answer: A maintainer (lionel-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.61.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.1-codex-max

What platform is your computer?

Linux 6.14.0-35-generic x86_64 x86_64

What issue are you seeing?

running codex resume --all or codex resume (in a directory that had a previous workspace) results in a blank screen, followed by the program exiting without any information. when the blank screen is shown no user action can exit it (eg. ctrl-c). it eventually just silently fails. I was previously on 0.46 and it worked; I upgraded to latest and it stopped working. I reverted to 0.46 and it's still a problem. I have no other running sessions. choosing a model beforehand also makes no difference, same effect.

What steps can reproduce the bug?

codex resume --all || codex resume

What is the expected behavior?

list resume sessions as per the command chosen

Additional information

_No response_

View original on GitHub ↗

7 Comments

lionel-oai contributor · 8 months ago

Hi @riordant thanks a lot for raising this bug, I'm not able to reproduce both commands are working fine on the 0.61.0 version for me. Could you try to look into your ~/.codex folder and check that the files / directories are not empty?

ls -l ~/.codex
ls -l ~/.codex/sessions

You should see something like:

> ls -l ~/.codex
total 56
-rw-------  1 lionel  staff  5265 Nov 19 09:02 auth.json
-rw-------  1 lionel  staff  1653 Nov 20 15:00 config.toml
-rw-------@ 1 lionel  staff  8233 Nov 20 14:55 history.jsonl
drwxr-xr-x  3 lionel  staff    96 Nov 19 09:01 log
drwxr-xr-x  3 lionel  staff    96 Nov 19 09:02 sessions
-rw-r--r--  1 lionel  staff   101 Nov 20 07:16 version.json
> ls -l ~/.codex/sessions
total 0
drwxr-xr-x  3 lionel  staff  96 Nov 19 09:02 2025

and could you also check that history.jsonl is not empty?

chaichontat · 8 months ago

I ran into this too, but only when I was in a different directory and using --cd to set the working directory. The issue did not occur when I'm already in the directory that was previously used.

riordant · 8 months ago
❯ ls -l ~/.codex
total 520
-rw------- 1 riordant riordant   4241 Nov 17 11:47 auth.json
-rw------- 1 riordant riordant   2017 Nov 20 16:51 config.toml
-rw------- 1 riordant riordant 502505 Nov 20 16:33 history.jsonl
drwxrwxr-x 2 riordant riordant   4096 Oct  7 13:41 log
drwxrwxr-x 3 riordant riordant   4096 Oct  7 13:43 sessions
-rw-rw-r-- 1 riordant riordant     79 Nov 20 14:01 version.json
❯ ls -l ~/.codex/sessions

total 4
drwxrwxr-x 4 riordant riordant 4096 Nov  6 09:56 2025

Ok so - it is resolving the session list now, the problem actually in fact seems to be that it's slow to load it. I think what was happening is that I was hitting ctrl-c while it was loading, and then it finally resolved the command after load, without showing the sessions.

  • Did anything change in between versions to cause the session loading screen to be slowed?
  • can i run it in debug mode to see how it loads?

if there's a potential for it to slowdown then a loading indicator would be a good idea. if it should be pretty much instant always then I guess there is a bug somewhere.

lionel-oai contributor · 8 months ago

I think you history.jsonl is quite big compared to mine so it makes sense that you would take longer to load. How long approximately do you have to wait? Around 2-3 seconds?

whizzrd · 7 months ago

Additional investigation:

Observed on codex-cli 0.65.0 (released) in a fresh directory with no prior sessions.

When codex resume or /resume is run from a directory with no prior sessions, the picker shows an empty list with no hint, even though sessions exist elsewhere. The picker filters to the current working directory by default:

  • tui/src/resume_picker.rs:79-84 sets filter_cwd = current_dir unless --all is used.
  • tui/src/resume_picker.rs:247-262 drops any session whose recorded cwd doesn’t match the current dir or whose meta lacks cwd.

Result: launching Codex in a fresh directory hides all sessions and looks broken; the empty state just says “No sessions yet.”

Suggested fix: if the filtered list is empty, fall back to showing all sessions or prompt to show all; at minimum change the empty-state hint to “No sessions for current directory. Press A or run codex resume --all to show all sessions.”

Repro:
1) Start Codex in a new directory (no previous sessions there).
2) Run /resume or codex resume.
3) Observe empty picker; run with --all to see sessions.

yinkev · 5 months ago

I took a look at the resume picker code and I think the initial “blank screen” + “no loading indicator” can happen even when things are just slow (e.g. larger ~/.codex/history.jsonl).

Proposed fix (small + test-covered):

  • Subscribe to the TUI draw event stream before scheduling the initial background load, so the first requested draw can’t be dropped due to there being no draw-subscriber yet.
  • Show an explicit loading message during the initial load (so users don’t assume it hung / hit Ctrl-C).

Patch (single commit, includes a regression unit test): https://gist.github.com/yinkev/d95f458b6408d4b0c72f8947b145dd63

Local checks I ran (per contributing docs):

  • just fmt
  • just fix -p codex-tui
  • cargo test -p codex-tui

If this approach matches what you want, I’m happy to open a PR if invited (I saw the repo is invitation-only for PRs).

etraut-openai contributor · 3 months ago

This should now be fixed. We've switched to a sqlite db to track sessions, eliminating the need to do a slow file system enumeration.