Is it safe to delete ~/.codex?

Protected. Spaceific never suggests moving it. If you choose it anyway, it needs its own tick.

What it is

Codex's own folder for what it keeps on this Mac. OpenAI's Codex documentation: “Codex stores its local state under CODEX_HOME (defaults to ~/.codex).”

Made by
Codex (com.openai.codex)
If you remove it
  • This folder can hold Codex's sign-in credentials (on the Mac this rule was checked on, a credentials JSON file; Codex can keep them in the macOS keychain instead), its session history (session JSONL files and history databases) and its settings (a TOML file), with its plugins and caches.
  • Removing it loses that history and those settings, and signs you out of Codex when the credentials are kept here.
How it comes back

Put Back from Cleanup History while it is in the Trash. Nothing else brings it back: signing in again does not restore the history or the settings.

The proof

Verified by
  • vendor documentation: OpenAI, Codex “Advanced configuration” (https://learn.chatgpt.com/docs/config-file/config-advanced), read 9 Nov 2026 and again 10 Nov 2026, “Codex stores its local state under CODEX_HOME (defaults to ~/.codex).”; on credentials, the same page: “auth.json (if you use file-based credential storage) or your OS keychain/keyring”.
  • What it holds was read by file name and type only on 6 Nov 2026 (Step R-0); no file in it was opened.
Checked on
macOS 26.6.2, Codex 26.1029.61003
Catalogue
Spaceific's rules.json 1.5.0, 10 Nov 2026. The whole file.

Related

Spaceific shows this rule for this folder in the app, checks it again at the moment you act, and moves only to the Trash, with Put Back. What Spaceific is.