What Codex leaves on your Mac.
Sessions, archived sessions, temporary git repositories, caches and Codex worktrees. Devbroom finds them all, and tells you which ones Codex manages itself, which are left to you and which are never touched.
Every folder has its own rule.
Devbroom handles every place the way Codex itself behaves. What the agent cleans itself it leaves to the agent; what has its own command it leaves to that command.
Temporary git repositories
Leftover git-* temporary repositories. What they're for isn't documented; have a look before cleaning.
~/.codex/.tmpCache and logs
The cache is rebuilt when needed; logs are only logs.
~/.codex/cache~/.codex/log~/Library/Logs/com.openai.codexSessions
Deleting the log files by hand leaves stale rows in the database. Codex's own command, codex delete <id>, should be used.
~/.codex/sessions~/.codex/archived_sessionsCodex worktrees
The desktop app keeps the newest 15 and takes a snapshot before deleting one.
~/.codex/worktreesShell snapshots
Codex deletes the ones older than 3 days itself.
~/.codex/shell_snapshotsPlugins
Codex manages its plugins.
~/.codex/plugins/cacheDesktop app data
The app's state and internal database; never edited or deleted directly.
~/Library/Application Support/Codex~/.codex/*.sqliteYour account and settings stay untouched.
These files and folders are protected. No verdict ever opens them to cleaning; they stay where they are whatever their size.
~/.codex/auth.json~/.codex/config.toml~/.codex/history.jsonl~/.codex/sqliteRecognizes Codex's worktrees by their traces.
It tells a worktree belongs to Codex from these traces; the stronger the trace, the more certain the ownership it shows.
- CertainCodex's
codex-thread.jsonmarker in git metadata - LikelyInside the
~/.codex/worktreesfolder - PossibleA branch name starting with
codex/
- Blocked if it holds unsaved work. git won't remove such a worktree without
--force; Devbroom never uses--force. - Blocked if a session runs in it or in its parent folder.
- Review if it has ignored files:
git worktree removedeletes them without asking.
Sees them, leaves them alone while they run.
Devbroom knows which Codex sessions are running. It never touches a running session's processes; its folder stays Blocked while the session lasts.
Checks Codex's files first.
Before trusting an agent's data, Devbroom checks that its files are in the expected format. If they aren't, that data is only read; none of it counts as ready to clean.
A version outside this range still works if the format holds, and shows as “not tested yet”.
The log files in ~/.codex/sessions must start with a metadata line that carries the session's folder.
If its folders live elsewhere, it follows CODEX_HOME.