[Windows Desktop] Stale CODEX_SQLITE_HOME and CODEX_INSTALL_DIR are injected into every new task after user variables are removed

Open 💬 0 comments Opened Aug 19, 2026 by xx20000205xx-design

Summary

Codex Desktop on Windows continues to inject historical E: drive paths into every newly created task process, even though the corresponding user-level and machine-level environment variables have been removed.

This behavior persists after a full Windows restart and after uninstalling/reinstalling Codex. It occurs alongside recurring conversation archive failures and occasional thread not found errors.

Environment

  • Codex Desktop MSIX: 26.814.5167.0
  • Windows x64 build: 26200.9168
  • Host: local Windows

Historical configuration

The following user environment variables were previously configured:

CODEX_HOME=E:\codex\state
CODEX_SQLITE_HOME=E:\codex\state\sqlite
CODEX_INSTALL_DIR=E:\codex\bin

They have since been removed. Read-only checks now show all three variables unset at both User and Machine scope.

Actual behavior

In every newly started Codex task process:

CODEX_HOME=<unset>
CODEX_SQLITE_HOME=E:\codex\state\sqlite
CODEX_INSTALL_DIR=E:\codex\bin

The E: paths therefore reappear at Process scope despite no longer existing at User or Machine scope. Codex also recreates state beneath the historical E: location.

Associated archive failures include:

failed to archive session: thread-store internal error:
failed to archive thread: The system cannot find the file specified. (os error 2)

After some failed archive attempts, continuing the conversation returns:

thread not found: <thread-id>

Restarting the desktop app can temporarily make the conversation usable again, but does not eliminate the injected paths or reliably fix archiving.

Verification and troubleshooting already performed

  • Removed the three variables from User scope.
  • Confirmed the variables are unset at User and Machine scope.
  • Fully restarted Windows.
  • Repeated the check in newly created Codex tasks.
  • Uninstalled and reinstalled Codex more than once.
  • Performed a reversible isolation/reset of Codex-only runtime, cache, global-state, and historical E: state.
  • Restored the original state after the isolation test.
  • No non-Codex application files or Windows-wide settings were modified.
  • The Process-scope E: injection remained reproducible.

Local diagnostics recorded multiple archive failures across different conversation IDs, subsequent thread not found events, and repeated bundled_executable_relocation_failed warnings. Raw logs, databases, authentication files, personal paths, and conversation contents are intentionally not attached.

Expected behavior

After the user-level variables are removed and Windows is restarted:

  1. New Codex processes should not receive the historical E: paths.
  2. Codex should use its supported default locations on C:.
  3. Uninstalling/reinstalling should not preserve an undocumented per-process injection source.
  4. Archiving should not leave a thread temporarily unresolvable.

Request

Please investigate where Codex Desktop persists or reconstructs CODEX_SQLITE_HOME and CODEX_INSTALL_DIR for newly spawned task processes on Windows.

A supported way to reset these internal path overrides to the default locations would also be helpful.

Potentially related archive reports:

  • #39161
  • #39179
  • #39130

In-app feedback ID: 01a01546-426d-7b41-ab8b-5375653dc37e

I can provide targeted, sanitized diagnostic excerpts if maintainers identify the specific fields needed.

View original on GitHub ↗