Codex Temporary Files
Codex writes per-command temporary working files under ~/.codex/tmp while it prepares prompts, streams model responses, unpacks attachments, and stages intermediate JSON payloads for local processing. These settled temp files can remain behind after interrupted runs, crashed terminals, or commands that generated large transient artifacts, gradually filling disk space with orphaned request fragments, extracted files, and partial output buffers. Kudu removes only the completed temporary files in ~/.codex/tmp and leaves the separate plugin staging and backup area under .codex/.tmp, along with your account data, settings, and project files, untouched.
Why clean Codex Temporary Files?
- Interrupted Codex runs leave orphaned request payloads and partial output files in ~/.codex/tmp, which shows up as steadily growing disk usage even after the command finished days ago
- Large extracted attachments and transient workspace files can accumulate from past prompts, causing low-disk-space warnings and failed writes when you run another Codex task
- Stale temporary JSON fragments from aborted sessions can make troubleshooting harder because old artifacts look like current command output when you inspect the temp directory
- Thousands of leftover small temp files increase directory scan overhead, so shell completion, backup tools, and antivirus scans spend noticeably longer walking ~/.codex
- Partial downloads and incomplete streamed response buffers from a network drop can linger in tmp, leaving confusing half-written artifacts that look like Codex stopped mid-answer
- Old settled temp files may expose snippets of prompts, generated text, or unpacked inputs on disk longer than intended, which is noticeable when searching your home directory or reviewing storage usage
Cache paths Kudu targets
Windows
~/.codex/tmp |
macOS
~/.codex/tmp |
Linux
~/.codex/tmp |
Common questions about Codex Temporary Files
Download Kudu and reclaim your disk space.
Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.