Can't set up environment with Codex cloud

I can’t set up my environment on codex cloud, because apt-get seems to have no network access, and I cannot use my own container. Relevant parts of the environment config script:

sudo apt-get update
sudo apt-get install -y \
  postgresql postgresql-contrib redis-server build-essential \
  libpq-dev curl

resultant output:

... (truncated)
Err:8 http://archive.ubuntu.com/ubuntu noble-updates Release
  Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

0% [Working]
            
Err:9 http://security.ubuntu.com/ubuntu noble-security Release
  Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

0% [Working]
            
Err:10 http://archive.ubuntu.com/ubuntu noble-backports Release
  Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

10% [Working]
             

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 6%

Reading package lists... 6%

Reading package lists... 55%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 69%

Reading package lists... 69%

Reading package lists... 74%

Reading package lists... 74%

Reading package lists... 79%

Reading package lists... 79%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 89%

Reading package lists... 89%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... Done

E: The repository 'http://apt.llvm.org/noble llvm-toolchain-noble-19 Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.ubuntu.com/ubuntu noble-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Codex cloud is advertised as being “for professional dev work on production repos”, but doesn’t seem appropriate for any project more difficult to configure than a freshman university project. My actual environment setup is much more complicated than this, but I cannot even get past installing basic ubuntu deps, nor can I use my own container.

This is being discussed in this thread Codex cloud agent unable to install pnpm dependencies - #7 by vb

All environment setup needs to be specified in the Environment setup which is configured through the Codex web app. The agent will have no network access once environment is setup.

1 Like

Thanks for responding, but this is not the same issue, because I am configuring the environment in the advanced tab of the environment setup on the web app

1 Like

Sounds like there are other issues too, e.g. bun install on environment setup …I’ve only used pip thus far but sounds like beta test preview blues for a lot of people including you. Hopefully they iron details out.

Seems that the environment variables can only be accessed through the setup script within the advanced script, not from any scripts in your actual repo

This is solved by doing apt-get update instead of sudo apt-get update in the deploy script.

No sudo needed, the script is running as root already.

2 Likes

I am seeing the same issues.

It means I cant get my tests to run before I ask it to create a pull commit.

I asked I have setup env vars in the advanced settings/environment, can you read them?'

Answer:

It looks like the current runtime environment does not expose your custom environment variables. When listing the container’s variables, only default values such as proxy settings and paths are visible, and nothing matches a custom variable you might have set. Therefore, I’m unable to see those variables.

This feels either a:

  1. Skill issue on my part
  2. Me not understanding how to get the tests to run before a commit
  3. OpenAI not expecting how some users might want to use Codex

This fixed it! However, I wouldn’t have expected sudo as root to have different behaviour like this, do you have any idea what might be causing it on openai’s side? Not urgent at all because I’m happy to simply remove the sudo call

1 Like