Codex desktop shell tool calls do not inherit terminal auth/session environment

Open 💬 2 comments Opened Mar 9, 2026 by rungchan2

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

  1. In a normal terminal, run:<br>supabase db push<br>This works.
  2. In Codex desktop, ask Codex to run:<br>supabase db push
  3. 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-type fail 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?

  1. Open a project in Codex Desktop where Supabase is already linked.
  2. In a normal terminal on the same machine, run supabase db push and confirm it works.
  3. In Codex Desktop, ask Codex to run supabase db push in the same workspace.
  4. 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.
  5. Optionally run npm run update-type from 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

View original on GitHub ↗

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