Feature: Docker container persist

Resolved 💬 2 comments Opened Apr 19, 2025 by BadPirate Closed Nov 16, 2025

Currently the run_in_container script deletes any existing containers on each fresh launch, not really a big deal as it only has the ability at the moment to persist files in the working directory (which persists outside the container anywho). However with Feature request #387 which would allow codex to perform passwordless sudo, and the recently landed #371 which uses a different container name for each workspace, one could use the AI to properly setup it's environment for a workspace (installing helpers, tools, updating node version, etc) and that setup could persist across executions.

Proposal

Add flag --persist-container to run_in_container.sh, if enabled, instead of deleting any existing container when executing a new run, it would stop any running container (still a good idea to have only one codex operating on a workspace at a time), and remove the step that deletes the container post-run, would need to be used with each run (locally devs would likely use an alias)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗