Apps

Codex Temporary Files

Codex writes per-command temporary working data under .codex/tmp while it prepares prompts, expands attachments, stages streamed responses, and assembles transient JSON request and output files. These files exist only to support in-progress or recently finished CLI operations and can accumulate after interrupted runs, crashes, or long sessions. Kudu removes settled Codex temporary files from .codex/tmp while leaving the separate plugin staging and backup area under .codex/.tmp, along with your projects, settings, accounts, and saved history, untouched.

Why clean Codex Temporary Files?

  • Aborted or crashed Codex runs leave orphaned request payloads, attachment copies, and partial response fragments in .codex/tmp, which shows up as steadily growing disk usage even when no command is running
  • Temporary streamed-output files from interrupted sessions can be mistaken for active state on the next launch, causing a command to appear stuck resuming or to pause before starting fresh work
  • Large unpacked attachments and prompt expansion scratch files consume home-directory space, leading to obvious "no space left on device" errors during later Codex commands or unrelated developer tools
  • Old transient JSON and pipe-spool files can leave behind incomplete artifacts after a failed command, which users notice as half-written output files or leftover temp directories in project folders
  • Too many settled temp files in .codex/tmp slow directory scans and cleanup passes, making startup and command teardown feel delayed after heavy CLI use
  • On shared or long-lived machines, old temporary command data can preserve copies of prompt inputs and generated intermediate text longer than intended, so cleaning reduces that leftover local footprint without touching saved history or configuration
What gets cleaned

Cache paths Kudu targets

Windows

~/.codex/tmp

macOS

~/.codex/tmp

Linux

~/.codex/tmp
Frequently asked

Common questions about Codex Temporary Files

Free & open source

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.