Aident AI

Codex CLI Using 30% CPU While Waiting? Disable TUI Animations
If codex-main keeps using roughly 30% CPU while Codex is only waiting for a background terminal, disable TUI animations in ~/.codex/config.toml, restart Codex, and repeat the same wait. Current reports trace the idle load to a status indicator that schedules redraws about every 32 milliseconds even though the foreground has no new work to display.
Start with this supported configuration:
Do not stop the background command just to quiet Codex. It may still be compiling, testing, or writing files. First separate CPU used by the child process from CPU used by the Codex TUI.
Confirm That Codex, Not the Background Command, Is Busy
The useful signature has three parts:
Codex says it is waiting on a background terminal.
The child command is idle or using much less CPU than
codex-main.Codex CPU drops when the TUI is not redrawing or after animations are disabled.
On macOS or Linux, find the Codex and child processes with a read-only process listing:
Replace the child-process names with the command you actually started. Sample the output several times over 15 to 30 seconds. A single spike during normal output is not this bug.
Observation | More likely cause | Next step |
|---|---|---|
| TUI status redraw loop | Disable animations and repeat the same wait |
The compiler, test runner, or dev server stays busy | Real background work | Let it finish or stop it through Codex after reviewing what it is doing |
Memory grows but CPU is low | Different process or history leak | Use the Codex high-memory guide |
| Computer Use capture path | Use the Computer Use CPU guide |
Windows | Windows process-enumeration loop | Use the Codex Windows CPU guide |
The August 9 report measured about 31 redraws per second and about 30% CPU in the Codex process while a separate Rust build was still running. An older upstream report independently measured excessive terminal writes during the animated status state, including rapid tmux history growth. Together, they make the TUI a defensible first A/B test, not proof that every busy Codex process has the same cause.
Disable TUI Animations Without Duplicating the Table
Open ~/.codex/config.toml. If the file already contains a [tui] table, add only the animations key inside that table:
Do not add a second [tui] header. Duplicate TOML tables can make Codex reject the configuration.
OpenAI's current configuration schema defines tui.animations as the switch for welcome-screen motion, shimmer effects, and spinners. It defaults to true. The same workaround was confirmed by an OpenAI maintainer in an earlier status-animation report.
Fully exit the current Codex CLI session after saving the file, then start a new session. The setting does not retroactively change a TUI process that is already running.
Remove the Animated Terminal Title Only if It Still Churns
Codex also supports a separate terminal-title configuration. The current default includes both spinner and project, so some terminals, SSH sessions, and multiplexers can still react to frequent title updates.
If CPU, terminal bells, cursor flicker, or tab-title churn remains after disabling animations, keep the title static:
Test one change at a time. The static title targets terminal-title updates; it does not prove that the 32-millisecond status redraw caused your CPU use. OpenAI also allows terminal_title = null to disable title updates entirely, but a static project title preserves useful context with less motion.
Run a Controlled Before-and-After Test
Use the same Codex version, repository, terminal, and background command for both runs.
Record
codex --version.Start one harmless bounded wait, such as a 60-second sleep, through Codex.
While Codex reports that it is waiting, sample
codex-mainCPU for 15 to 30 seconds.Stop the test cleanly and exit Codex.
Add
animations = falseunder the existing[tui]table.Start a fresh Codex session and repeat the same bounded wait.
Compare sustained CPU, not the launch spike.
Success means the Codex process settles near idle while the background command remains tracked and completes normally. If the improvement only appears after also removing spinner from terminal_title, record that distinction.
Do not use an unbounded build, production migration, deployment, or destructive command as the test workload. The purpose is to isolate redraw overhead, not to stress the machine.
If CPU Stays High
Keep the configuration change only if it improves the controlled test. Otherwise restore the prior setting and identify the actual busy process.
Check these branches:
If the child command owns the CPU, inspect its normal logs and stop it only through the workflow that launched it.
If
codex-mainstays busy with no background task, restart once and test in an empty repository to separate project hooks or integrations.If CPU rises only inside
tmuxorscreen, test a plain terminal and keep terminal-title animation disabled.If the symptom began after an update, preserve the Codex version, OS, terminal, multiplexer version, and a short sanitized process sample for the upstream issue.
Avoid deleting ~/.codex, task history, configuration, or project files. None of the cited evidence indicates corrupted state, and destructive cleanup does not address a redraw cadence.
Monitor the Fix Without Keeping a Browser Open
The exact upstream issue can change as Codex releases move. A read-only GitHub lookup is a better monitor than repeatedly opening issue pages or running Computer Use.
Start with this setup phrase:
Follow https://aident.ai/SETUP.md
Then ask:
Check Aident Loadout authentication and Vault status. Search the staging capability catalog for the current read-only GitHub issue lookup Action, inspect its schema, and preflight exact lookups for openai/codex issues 37706, 11877, and 7125. If every estimate is valid and free, execute the lookups and return only issue number, state, updated time, labels, title, and canonical URL. Do not comment, react, edit, close, create, run Bash, or expose credentials.
Success is measurable: the three issue states return through the structured integration, no GitHub write occurs, and no provider credential appears in the prompt or output.
Set up Aident Loadout and monitor the Codex redraw fix.
Sources
OpenAI Codex issue 37706: status indicator redraws while waiting
OpenAI Codex issue 11877: terminal animations use excessive output
OpenAI Codex issue 16332: animated terminal title workaround
Refresh this guide when issue 37706 closes with a released fix, the TUI redraw interval changes, or OpenAI changes the tui.animations or tui.terminal_title contract.



The one tool
for every tool
your agent needs.
Give any AI agent real capabilities in seconds. Connect 1,000+ tools once, skip the setup headache, and let your agents execute.
