Codex CLI slow startup / severe input lag (Possibly since 0.84, possibly related to IO / FileProvider churn)
What version of Codex is running?
codex-cli 0.84.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.2-codex medium
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm Build 3.6.6
What issue are you seeing?
Since upgrading to codex-cli 0.84.0, Codex has become almost unusable on macOS due to extreme startup delay and persistent input lag in the TUI.
- On launch, it can take a long time before the initial UI / prompt is rendered.
- During this time (and even after the UI fully appears), keyboard input is accepted but rendered with significant delay (hundreds of ms to multiple seconds).
- The lag persists indefinitely; it does not resolve after Codex finishes loading.
- This affects basic typing and makes interactive use effectively impossible.
Downgrading does not fully resolve the issue:
- Reproduced on
codex-cli 0.84.0(Homebrew and npm installs) - Also reproduced after downgrading to
codex-cli 0.81.0 - So.. Might be a coincidence, but the horrible OneDrive / FileProvider / Spotlight I/O isn't quite new either.
This feels similar to #8976 (“Input lag during high disk usage”), but in my case the lag can persist even after background activity appears to subside.
What steps can reproduce the bug?
- Open terminal (iTerm2).
- Run
codex. - While Codex is open, do something that increases disk activity (e.g. large git clone / dependency install).
- Type rapidly in the Codex input field.
- Observe delayed input rendering.
What is the expected behavior?
Typing into Codex TUI should remain responsive even under moderate/high disk IO, similar to normal terminal input.
Additional information
Environment
- macOS: Darwin 24.6.0 (Apple Silicon, arm64)
- Terminal(s): iTerm2, Warp (same behavior in both)
- Shell: zsh
- Install methods tested:
- Homebrew cask (
/opt/homebrew/bin/codex) - npm global install (asdf-managed Node.js)
- Node version: asdf-managed Node.js 22.x
- Models tested:
gpt-5.2-codex(multiple sizes)
What does NOT help
- Downgrading Codex to 0.81.0
- Disabling alternate screen (
--no-alt-screen) - Disabling web search
- Switching terminals (iTerm2 vs Warp)
- Restarting Codex after it has fully loaded
- Removing unrelated background apps (OneDrive, Grammarly, etc.)
- Logging out / back in (temporary system smoothness, Codex still lags)
Observations (non-conclusive)
- System-wide input is otherwise responsive; the lag is isolated to Codex’s TUI.
- During troubleshooting, there was notable system I/O activity from unrelated services (e.g. FileProvider / Spotlight / cloud sync), but:
- This activity is not new to the system
- The Codex lag is new and persists even when I/O activity subsides
- Because of this, any relationship to I/O pressure is currently only a hypothesis, not a confirmed cause.
Expected behavior
- Interactive typing in Codex should render immediately, comparable to a normal terminal application.
- Startup time and input latency should not degrade interactive usability.
Actual behavior
- Long delay before UI becomes visible
- Severe and persistent input lag even after UI is fully rendered
If there are known diagnostics, logging flags, or performance traces that would help narrow this down, I’m happy to collect and attach them.
With the advice of your robot, I captured a diagnostics bundle with:
iostatsnapshots- top CPU processes
fs_usage(short, filtered)- Spotlight/FileProvider process snapshot
log show(last 15m, filtered on FileProvider/Spotlight/OneDrive)log stream(10s, filtered on fileproviderd/Finder/OneDrive)
11 Comments
Thanks for the report. I don't think we've observed this or received any other reports of this yet. We'll likely need some additional help from you to pin down the problem. You mentioned that you saw this first with 0.84. What was the last version where this didn't occur?
Thanks for the response @etraut-openai
It seems to have started after upgrading from 0.81 to 0.84, but as I said, downgrading did not seem to fix it so I can't quite say for certain it's version specific
As I mentioned, we haven't received any other reports of this, so it must be something specific to your system or configuration.
Here's a thought... maybe it's related to some large or corrupt state in your
~/.codexdirectory. Try renaming that directory temporarily and see if that clears it up. You'll need to log in again after the rename.Hi @etraut-openai - yep, that was indeed a my-machine issue. Wrong guess on my part:)
Resetting the
.codexfolder fixed it.It seemed to have been related to the shell snapshot, in combination with the fact I had recently added a program that runs automatically during shell init that expects an interactive TTY and is a tiny bit slow to boot. So, yeah, not the most common setup.
That caused repeated snapshot timeouts and a humongous log file. the lag went away once I gated that program to real interactive terminals (which is what it should have been doing anyway 🫣).
Could have guessed that sooner, but it took a while for the logs to grow big enough to cause the TUI issues.
Just a bit of post-mortem info in case it's useful with my guess of what happened
Config context from
~/.codex/config.tomlwhich I think is relevant:Problematic file growth in
~/.codex:~/.codex/log/codex-tui.logwas 219M with 1,052,359 lines.~/.codex/log/codex-tui.logis ~23K (well, since I reset it, makes sense)Log excerpts showing the timeouts (from the large log):
Related TUI errors around the same timestamps:
Thanks for sharing the analysis. That's helpful in case other users run into a similar situation.
hi there, i just installed codex on windows and there is indeed severe input lag when typing
yes a bit laggy for me too on windows
Agreed on both windows AND linux vps
Very laggy on windows and on Weztem, input lag is really bad
Running a bit better in wsl
I hit the same input lag and tracked it down to the paste-burst heuristic in the TUI. On every plain ASCII keystroke, codex holds the character for a short interval (8 ms on Unix, 30 ms on Windows) trying to detect whether it's the start of a paste.
Disabling it fixed the lag for me completely. Add this to ~/.codex/config.toml:
Input lag on Ubuntu too