codex - 💡(How to fix) Fix Startup time 20 seconds and resume 20 seconds. [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
openai/codex#18839Fetched 2026-04-22 07:51:43
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2cross-referenced ×1unlabeled ×1

Root Cause

› it works the same with any terminal. I dont use any plugins. Memories dont help, because i had the same delay before memories inside newest version.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.122.0

What subscription do you have?

pro

Which model were you using?

gpt-5-4

What platform is your computer?

Linux 6.17.0-22-generic x86_64 unknown

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

A terminal inside VScode and default linux terminal.

What issue are you seeing?

Codex starts 10 or more seconds. /resume takes 20 more seconds. then when i choose exact session another 10 sec of loading. It is not OKAY.

What steps can reproduce the bug?

Idk. i guess a lot of sessions and ubuntu.

What is the expected behavior?

No response

Additional information

codex`s answer

  • codex --help starts in 0.07s, so the binary/Homebrew/Node wrapper is fine.
  • This folder is tiny, so it is not scanning your university project.
  • You currently have about 8 active codex --yolo sessions still running, plus 1 stopped Codex process, plus 2 VS Code Codex app servers.
  • ~/.codex is 7.5 GB.
  • ~/.codex/sessions is 6.3 GB with 3067 session files. Some are huge: one is 415 MB, 117 are over 10 MB.
  • Codex TUI log is huge: about 714-748 MB.

› it works the same with any terminal. I dont use any plugins. Memories dont help, because i had the same delay before memories inside newest version.

codex`s answer • Then terminal/plugins/memories are not the main cause. Most likely common cause is Codex local state/session storage, because it affects every terminal and also affects resume. Specifically: Codex startup touches:

  • ~/.codex/state_5.sqlite
  • ~/.codex/logs_2.sqlite
  • ~/.codex/sessions/**
  • big ~/.codex/log/codex-tui.log

extent analysis

TL;DR

The most likely fix is to reduce the size of the Codex local state and session storage, specifically the ~/.codex/sessions directory and the codex-tui.log file.

Guidance

  • Verify the size of the ~/.codex/sessions directory and the codex-tui.log file to confirm they are contributing to the delay.
  • Consider deleting or archiving old session files in ~/.codex/sessions to reduce the directory size.
  • Check the codex-tui.log file for any errors or issues that may be causing it to grow excessively.
  • Try removing the large codex-tui.log file to see if it improves startup time.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue seems to be related to the size of the local state and session storage, which is affecting the startup time of Codex. Reducing the size of these files and directories may help improve performance.

Recommendation

Apply workaround: Reduce the size of the ~/.codex/sessions directory and the codex-tui.log file to improve startup time. This is recommended because the issue is likely caused by the large size of these files and directories, and reducing their size may help improve performance.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Startup time 20 seconds and resume 20 seconds. [2 comments, 2 participants]