You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft Windows NT 10.0.19045.0 x64 (with WSL2 Ubuntu 24.04)
What steps can reproduce the bug?
Create a new project folder with a .env file containing:
HOME=/something
Run any codex command inside that folder:
Observe the error:
Error: Permission denied (os error 13)
What is the expected behavior?
codex should not be affected by the project's .env file.
What do you see instead?
codex is affected by the project's .env file.
Additional information
When running Codex CLI inside WSL2 (and in VS Code), if the project contains a .env file that sets HOME=..., the CLI picks up this value as its home directory. This makes Codex try to read/write its config and state in a non-existent or inaccessible directory. The result is: Error: Permission denied (os error 13).
Meanwhile, if I comment out or remove the HOME variable from .env, codex cli works normally.