Cannot resume sessions when setting variable

Resolved 💬 6 comments Opened Oct 20, 2025 by MarianoFacundoArch Closed Oct 23, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.47.0

What subscription do you have?

PRO

Which model were you using?

Codex high

What platform is your computer?

24.5.0 arm64 arm

What issue are you seeing?

When I launch commands like:

CODEX_HOME=/Users/myusername/Documents/Personal/Whatour/config/runtime/codex/fsdfds codex exec --json --skip-git-repo-check resume 019a03bf-3490-7733-bfb6-0376f023c045 "did i tell you my name? "

It does not restore the context, it creates a new session every single time. It happens only when I specify the CODEX_HOME path, if not, it works.

What steps can reproduce the bug?

Launch codex resume for sessions while specifying CODEX_HOME to a different directory. It will not work and will create a new sesson, ignoring the resume.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #5247

Powered by Codex Action

MarianoFacundoArch · 10 months ago

i can confirm it happens only if the path is in gitignore

tibo-openai collaborator · 10 months ago

Is the CODEX_HOME path provided covered by a gitignore?

MarianoFacundoArch · 10 months ago

Yes it is!
When i remove it from gitignore it works

MarianoFacundoArch · 10 months ago

How shall we fix this?

tibo-openai collaborator · 10 months ago

I'm working on https://github.com/openai/codex/pull/5311 to fix this.