Codex desktop shell tool calls do not inherit terminal auth/session environment
What version of the Codex App are you using (From “About Codex” dialog)?
26.305.950(863)
What subscription do you have?
plus
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Summary
Commands that succeed in my normal terminal fail when executed by Codex desktop because the command execution environment does not inherit the same auth/session environment.
Repro
- In a normal terminal, run:<br>
supabase db push<br>This works. - In Codex desktop, ask Codex to run:<br>
supabase db push - Codex fails with:<br>
Access token not provided. Supply an access token by running supabase login or setting the SUPABASE_ACCESS_TOKEN environment variable.
Expected
Codex command execution should inherit the same shell/session/auth environment as my terminal, or clearly document/isolate that it does not.
Actual
Codex can see the repo and linked Supabase project, but shell commands do not see the same auth state as my terminal session.
Additional notes
- This looks related to shell/env handling issues like:
- CLI-1536
- CLI-260
- In my case, the mismatch affects auth/session propagation, not just PATH/default shell.
- I also observed
npm run update-typefail for the same reason because the redirected shell command runs in the Codex execution environment rather than my working terminal session.
What steps can reproduce the bug?
- Open a project in Codex Desktop where Supabase is already linked.
- In a normal terminal on the same machine, run
supabase db pushand confirm it works. - In Codex Desktop, ask Codex to run
supabase db pushin the same workspace. - Observe that Codex fails with:
Access token not provided. Supply an access token by running supabase login or setting the SUPABASE_ACCESS_TOKEN environment variable. - Optionally run
npm run update-typefrom Codex as well and observe the same auth-related failure, even though the equivalent Supabase command works in the normal terminal.
What is the expected behavior?
Commands executed by Codex Desktop should inherit the same shell/auth environment as the user’s normal terminal session, or behave consistently enough that commands which work in the user terminal also work when Codex runs them. In this case, if supabase db push and supabase gen types work in my terminal, they should also work when run by Codex in the same workspace.
Additional information
No response
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗