Codex Windows App uses hardcoded %USERPROFILE%\.codex path — ignores CODEX_DIR / CODEX_HOME env vars

Open 💬 1 comment Opened Jul 18, 2026 by CTCycle

Feature Request

The Codex Windows App stores its user data (sessions, logs, memories, auth) in a hardcoded %USERPROFILE%\.codex directory and ignores the CODEX_DIR and CODEX_HOME environment variables that the Codex CLI tool respects.

Use Case

Users on Windows with limited C: drive space (e.g. small SSDs) or specific data organization requirements need to relocate the .codex data directory to another drive or path. Currently the only workaround is a directory symlink/junction, which is fragile and not officially supported.

Requested Behaviour

The Codex Windows App should read one of the following (in priority order) to determine where to store its user data:

  1. A CODEX_DIR or CODEX_HOME environment variable (matching the CLI tool behaviour)
  2. A config.toml setting (e.g. data_dir = "D:\Codex\data")
  3. Fall back to the current hardcoded %USERPROFILE%\.codex default

Why This Matters

  • Disk space management: ~/.codex can exceed 2 GB (session databases, logs, plugin caches)
  • Organisation: Users may keep all app data on a dedicated data drive
  • Consistency: The CLI tool already honours CODEX_DIR; the Windows App should too
  • Sync control: Users may want to exclude .codex from cloud backup on C: while keeping it on a local-only data drive

Workaround (not ideal)

Currently the only option is to manually create a directory junction/symlink:

mklink /D "%USERPROFILE%\.codex" "D:\path\to\.codex"

This requires Developer Mode or admin privileges and is unsupported by the app.

Environment

  • Windows App version: 26.715.3651.0
  • Windows 10 (local terminal, not WSL)
  • The Codex CLI tool (invoked via codex from terminal) does respect CODEX_DIR

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗