Hey im new here, I just came from Claude which basically just lives in my terminal and has access to the local docker instance in my dev environment. After I made the switch to codex i realize this connection to local docker is not allowed because Codex lives inside a another sandbox container (from what i understand)… so how would I go about this? I honestly want Codex to be able to access things on its on, not just Docker in the future.
If you have not, consider searching the GitHub OpenAI Codex issues, both open and closed
and also the GitHub OpenAI Codex discussions
its kind of odd no one solved this yet, and no proper response too.
The short answer is: Codex App is not using your full login-shell environment.
And likely on your machine, the app’s command runner is starting a zsh that is neither login nor interactive. In my case, I verified that in the app session: [[ -o login ]] is no and [[ -o interactive ]] is no. That means PATH changes from ~/.zprofile and~/.zshrc are not applied, while the lightweight exports in ~/.zshenv are.
That matches what I observed:
-
App/non-login PATH includes only entries from .zshenv, like Homebrew, pnpm, Flutter, .local/bin, .gem/bin.
-
A real login shell (zsh -lc) adds the missing entries from .zprofile, like JetBrains Toolbox, .dotnet, and Android SDK paths.
-
.zshrc would add even more interactive-only tooling like nvm, opam, lms, etc.
So the reason PATH looks “not propagated” is usually a combination of two things on macOS:
-
GUI apps inherit environment from launchd, not from your Terminal session.
-
Codex’s runner is effectively using a non-login shell, so it does not read the files where you add a lot of your PATH.
If you want the app to reliably see a tool, the practical fixes are:
-
Put essential, non-interactive PATH exports in ~/.zshenv .
-
Or launch Codex from a shell that already has the right env.
-
Or set machine/session env for GUI apps via launchctl setenv.
-
Or use absolute paths for tools that must always resolve.
While the Codex App behaviour is really odd, you can ask it to adjust the env variables for you, by sharing the context from this thread.