Skip to content

Remote SSH connection fail if remote default shell use fish #18183

Open

Description

@Clouder0

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.415.20818 (1727)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

When trying to connect to a remote machine with fish set as default shell, it would error out.

Image
ish: Missing end to balance this if statement
if command -v codex >/dev/null 2>&1; then exit 0; fi; exit 86
^^

Setting remote shell to bash again, works.

Local Shell is still fish, does not affect. Only remote destination's shell setting to fish would lead to such error.

Local macOS, Remote Linux.

What steps can reproduce the bug?

Set default shell to fish on remote machine:

chsh -s /usr/bin/fish $USER

Open Codex App, try to connect, then fail.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Apr 16, 2026
  2. added
    bugSomething isn't working
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Apr 16, 2026
  3. cyenxchen commented on Apr 19, 2026

    @cyenxchen

    I'm experiencing the same issue and hope for a quick fix

  4. BlackHole1 commented on Apr 23, 2026

    @BlackHole1

    It doesn't work when connecting to Windows via ssh either.

    ** WARNING: connection is not using a post-quantum key exchange algorithm.
    ** This session may be vulnerable to "store now, decrypt later" attacks.
    ** The server may need to be upgraded. See https://openssh.com/pq.html
    sh: The term 'sh' is not recognized as a name of a cmdlet, function, script file, or executable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    then:
    Line |
       5 |  c "$SHELL" -ilc '\''if command -v codex >/dev/null 2>&1; then exit 0;
         |                                                            ~~~~
         | The term 'then' is not recognized as a name of a cmdlet, function, script file, or executable program.
         | Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    fi:
    Line |
       5 |  -ilc '\''if command -v codex >/dev/null 2>&1; then exit 0; fi; exit 8
         |                                                              ~~
         | The term 'fi' is not recognized as a name of a cmdlet, function, script file, or executable program.
         | Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    86\':
    Line |
       5 |  \''if command -v codex >/dev/null 2>&1; then exit 0; fi; exit 86'\'''
         |                                                                 ~~~~~~~
         | The module '86' could not be loaded. For more information, run 'Import-Module 86'.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)remote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions