Codex CLI slow startup / severe input lag (Possibly since 0.84, possibly related to IO / FileProvider churn)

Resolved 💬 11 comments Opened Jan 15, 2026 by LemuelCushing Closed Jan 16, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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?

  1. Open terminal (iTerm2).
  2. Run codex.
  3. While Codex is open, do something that increases disk activity (e.g. large git clone / dependency install).
  4. Type rapidly in the Codex input field.
  5. 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:

  • iostat snapshots
  • 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)

diagnostics.txt

View original on GitHub ↗

11 Comments

etraut-openai contributor · 6 months ago

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?

LemuelCushing · 6 months ago

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

etraut-openai contributor · 6 months ago

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 ~/.codex directory. Try renaming that directory temporarily and see if that clears it up. You'll need to log in again after the rename.

LemuelCushing · 6 months ago

Hi @etraut-openai - yep, that was indeed a my-machine issue. Wrong guess on my part:)
Resetting the .codex folder 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.toml which I think is relevant:

sandbox_mode = "workspace-write"

[features]
rmcp_client = true
unified_exec = true
shell_snapshot = true

[shell_environment_policy]
experimental_use_profile = true
inherit = "core"
include_only = [
  "PATH",
  "HOME",
  "SHELL",
  "USER",
  "TMPDIR",
  "LANG",
  "LC_ALL",
  "TERM",
  "ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY",
  "ASDF_RUBY_VERSION",
]
# just to be extra extra safe 
exclude = ["*_API_KEY", "*_TOKEN", "*_SECRET", "*PASSWORD*"]

Problematic file growth in ~/.codex:

  • ~/.codex/log/codex-tui.log was 219M with 1,052,359 lines.
  • After fixing the shell init and resetting state, ~/.codex/log/codex-tui.log is ~23K (well, since I reset it, makes sense)

Log excerpts showing the timeouts (from the large log):

2026-01-15T14:48:57.756156Z  WARN codex_core::shell_snapshot: Failed to create shell snapshot for zsh: Snapshot
command timed out for zsh
2026-01-15T14:49:16.881015Z  WARN codex_core::shell_snapshot: Failed to create shell snapshot for zsh: Snapshot
command timed out for zsh
2026-01-15T14:50:36.714680Z  WARN codex_core::shell_snapshot: Failed to create shell snapshot for zsh: Snapshot
command timed out for zsh

Related TUI errors around the same timestamps:

2026-01-15T14:48:57.761750Z ERROR codex_tui::chatwidget::agent: failed to submit op: internal error; agent loop died
unexpectedly
2026-01-15T14:49:17.034346Z ERROR codex_tui::app_event_sender: failed to send event: channel closed
etraut-openai contributor · 6 months ago

Thanks for sharing the analysis. That's helpful in case other users run into a similar situation.

jqntn · 4 months ago

hi there, i just installed codex on windows and there is indeed severe input lag when typing

anlagbr · 2 months ago

yes a bit laggy for me too on windows

VisionaryOS · 2 months ago

Agreed on both windows AND linux vps

OneRevlis · 2 months ago

Very laggy on windows and on Weztem, input lag is really bad

Running a bit better in wsl

Evyatar108 · 2 months ago

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:

disable_paste_burst = true
A01752310 · 2 months ago

Input lag on Ubuntu too