Skip to content

Codex does not respect the user's default terminal (launches bash instead of zsh) #3916

@roukmoute

Description

@roukmoute

What version of Codex is running?

v0.39.0

Which model were you using?

gpt-5 medium

What platform is your computer?

Linux 6.12.38+deb12-amd64 x86_64 unknown

What steps can reproduce the bug?

Codex launches system commands in a default shell that appears to be bash, even if the user is using another shell such as zsh.
This is problematic because my working environment (PATH, aliases, etc.) is configured in zsh, and some commands fail or cannot be found when Codex runs through bash.


Steps to reproduce:

  1. Set your default shell to zsh (e.g. via /etc/passwd or chsh -s /bin/zsh).
  2. Open Codex (v0.39.0).
  3. Run a command that depends on the shell configuration (e.g. pnpm, or a command defined in .zshrc).
  4. Observe that Codex fails to find certain commands because it uses bash instead of zsh.

Concrete example:
In my case, when running:

Run tests

Codex executes:

• Ran pnpm nx run backend logs
  └ bash: ligne 1: pnpm : commande introuvable

Expected behaviour:
Codex should:

  • run commands in the user's default shell (e.g. the one configured in /etc/passwd, here zsh),
  • or allow the shell to be used to be specified explicitly in the configuration (/status, /init or other).

Environment:

  • Codex v0.39.0
  • User's default shell: /bin/zsh
  • Shell used by Codex: /bin/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions