Skip to content

Codex Cloud Web does not reuse cached environment and runs full setup on every new message/session #25086

Open

Description

@Ravanloft

What issue are you seeing?

Hi,

I am using Codex Cloud from the web interface with a ChatGPT Plus account. The documented behavior says that Codex Cloud environments may cache container state for up to 12 hours and should reuse the cached environment when possible.

However, in my case Codex Cloud appears to create a completely fresh environment every time I start a new chat/session or send a new task. It does not seem to reuse the previous cached environment at all.

What I observed

  • Every new Codex Cloud web session starts by configuring all language runtimes again.
  • The setup script runs every time.
  • The maintenance script also runs after setup.
  • Files created in /tmp are not present in the next session.
  • The environment behaves as if there is no cache reuse.
  • This happens even when I retry shortly after the previous session, well within 12 hours.
  • I did not intentionally reset the cache.
  • I did not change environment variables or secrets between the tests.
  • I did not change the setup script between repeated tests after the initial logging test.

Example log

Configuring language runtimes...
# Python: 3.12
Python 3.12.13
# Node.js: v20 (default: v24)
default -> 20 (-> v20.20.2 *)
Wrote version number (v20.20.2) to .nvmrc
Now using node v20.20.2 (npm v11.4.2)
# Ruby: 3.4.4 (default: 3.4.4)
# Rust: 1.89.0 (default: 1.95.0)
info: using existing install for 1.89.0-x86_64-unknown-linux-gnu
info: default toolchain set to 1.89.0-x86_64-unknown-linux-gnu

rustc 1.89.0 (29483883e 2025-08-04)
# Go: go1.24.3 (default: go1.25.1)
# Swift: 6.1 (default: 6.2)
Swift version 6.1.3
# PHP: 8.4 (default: 8.5)
PHP 8.4.22-dev
# Java: 21 (default: 25)
openjdk version "25.0.2" 2026-01-20

Running setup scripts...
+ echo 'SETUP RUN Fri May 29 12:14:59 UTC 2026'

CODEX_GIT_DEBUG begin repo_dir=/workspace/private clone_ref=main
CODEX_GIT_DEBUG remote_origin=https://<redacted>@github.com/ravanloft/private.git
git fetch origin --quiet --no-tags main
git switch -c work FETCH_HEAD
Switched to a new branch 'work'
nothing to commit, working tree clean
302780f04173401d8a0904c3011cbaaf6d6b5a90

Running maintenance scripts...
+ echo 'MAINT RUN Fri May 29 12:15:52 UTC 2026'

### What steps can reproduce the bug?

```markdown
1. Open Codex Cloud Web with a ChatGPT Plus account.
2. Use the same repository/environment and branch.
3. Add `echo "SETUP RUN $(date)" >> /workspace/setup-test.log` to the setup script.
4. Add `echo "MAINT RUN $(date)" >> /workspace/maint-test.log` to the maintenance script.
5. Start a new Codex Cloud task/session and let setup finish.
6. Start another new task/session shortly afterwards without changing setup, maintenance, env vars, secrets, or branch.
7. Observe that Codex runs the full setup again instead of reusing the cached environment.

### What is the expected behavior?

Expected behavior
After the first successful setup, a new Codex Cloud task/session within the cache window should reuse the cached environment when possible.
I would expect the full setup script not to run every time. Ideally, only the maintenance script should run when the cached environment is reused.

Actual behavior
Codex Cloud Web appears to rebuild the environment from scratch every time. The setup script is executed again on each new session/task, and the previous container state does not appear to be reused.

### Additional information

_No response_

Activity

  1. added
    bug
    on May 29, 2026
  2. added
    codex-web
    on May 29, 2026
  3. Ravanloft commented on May 30, 2026

    @Ravanloft
    Author

    @etraut-openai When will this issue be fixed? It's becoming very expensive, and I'm honestly getting fed up. At this rate, I don't think I'll continue using Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcodex-web

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions