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.