Remote project composer lacks the local project's pre-submit `New worktree` selector
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.527.31326 (3390)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Title: Codex Desktop remote project starts new chats in managed worktree/workspace without pre-submit local/canonical checkout option
Summary
In Codex Desktop for macOS, when starting a new chat from a remote SSH project, the app appears to immediately create/use a Codex-managed workspace/worktree after prompt submission. Unlike local projects, the remote-project composer does not expose a pre-submit selector such as “Local” / “New worktree”, so I cannot start the task directly in the canonical remote checkout from the Desktop UI.
This appears to be a regression or behavior change. I was able to work directly in the canonical remote checkout /group/chem/acrg/test_inversions a few days ago.
Environment
Local machine:
macOS
Codex Desktop app for Mac
codex-cli 0.132.0
Remote host:
HPC server accessed via SSH alias: bp1
Canonical repo path: /group/chem/acrg/test_inversions
Shell: /bin/bash
Local version check:
(agent-tracker) DL6H9DW2D1:agent-tracker bm13805$ codex --version
codex-cli 0.132.0
Remote canonical checkout state:
$ pwd
/group/chem/acrg/test_inversions
$ git rev-parse --show-toplevel
/group/chem/acrg/test_inversions
$ git worktree list
/group/chem/acrg/test_inversions d823687 [codex/...]
/home/.../.codex/worktrees/.../test_inversions 1582b27 (detached HEAD) prunable
Current behavior
When I open the remote project in Codex Desktop and submit a prompt, the app immediately starts creating/using a managed workspace/worktree. A “work locally instead” control appears only after submission, but I cannot click it before the workspace/worktree creation starts.
The remote-project composer shows controls like:
test_inversions | No environment | main
It does not show a pre-submit “Local” / “Worktree” / “New worktree” selector.
By contrast, for a local project on my laptop, the composer shows:
test_inversions | New worktree | No environment | main
So the local-project UI exposes the worktree mode before submission, but the remote-project UI does not.
Request
Please expose an explicit pre-submit mode selector for remote SSH projects, matching local project behavior, or provide a project-level setting such as:
Default new remote threads to canonical checkout
Default new remote threads to managed worktree
At minimum, there should be a way to start a remote-project thread directly in the configured project directory without racing to click “work locally instead” after submission.
It would also help if the remote-project UI showed the actual resolved working directory / git toplevel before submission, so users can distinguish:
/group/chem/acrg/test_inversions
from:
/user/home/bm13805/.codex/worktrees/...
What steps can reproduce the bug?
- Configure a remote SSH project in Codex Desktop pointing at:
``text``
/group/chem/acrg/test_inversions
- Open the remote project in the Mac app.
- Observe the new-thread composer controls.
Actual remote-project controls do not include a pre-submit “Local” / “Worktree” selector.
- Submit a prompt.
- Observe that Codex starts creating/using a managed worktree/workspace immediately.
- Compare with a local project in the Desktop app: the local project composer exposes “New worktree” before submission.
- As a workaround, SSH to the same host and start the CLI manually from the canonical checkout:
``bash``
ssh -tt bp1 'cd /group/chem/acrg/test_inversions && exec /user/home/bm13805/.local/bin/codex'
The resulting chat appears in the Desktop app under the remote project and is associated with the canonical checkout location.
What is the expected behavior?
For remote SSH projects, the Desktop app should provide a pre-submit mode selector equivalent to local projects, allowing the user to choose one of:
- use the canonical checkout / configured remote project directory directly;
- create a new managed worktree;
- use any other available remote workspace mode.
For my use case, I need the agent to run directly in:
/group/chem/acrg/test_inversions
not in:
/user/home/bm13805/.codex/worktrees/...
This matters because the canonical checkout is tied to HPC workflows, existing run state, local configuration, and long-running jobs. Creating a new worktree is useful for many coding tasks, but not for this kind of operational/debugging task.
Additional information
Important observation / workaround
If I SSH to the HPC server, cd into the canonical checkout, and start codex manually there, the chat appears in the Codex Desktop app under the remote project and is associated with the location where I started the CLI.
In other words, the Desktop app/backend can represent and attach to a chat in the canonical remote checkout. The problem appears to be specifically that the Desktop remote-project composer starts new chats in managed worktree/workspace mode without giving the user a pre-submit choice.
The working workaround is essentially:
ssh -tt bp1 'cd /group/chem/acrg/test_inversions && exec /user/home/bm13805/.local/bin/codex'
Remote shell / PATH details
There is also a remote shell initialization complication which may be relevant.
In an interactive SSH login shell, codex is available from nvm:
[bm13805@bp1-login02(BluePebble) ~]$ type -a codex
codex is /user/home/bm13805/.nvm/versions/node/v20.20.2/bin/codex
codex is /user/home/bm13805/.local/bin/codex
[bm13805@bp1-login02(BluePebble) ~]$ command -v codex
/user/home/bm13805/.nvm/versions/node/v20.20.2/bin/codex
But a plain non-interactive remote SSH command does not load the same PATH:
(agent-tracker) DL6H9DW2D1:agent-tracker bm13805$ ssh bp1 'echo "$SHELL"; echo "$PATH"; command -v codex || true'
/bin/bash
/user/home/bm13805/bin:/user/home/bm13805/local/include:/system/steel-stack/slurm/23.11.6/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/lpp/mmfs/bin
To make Codex detectable from non-interactive remote commands, I added a shim at:
/user/home/bm13805/.local/bin/codex
with contents:
#!/usr/bin/env bash
export CODEX_HOME="/user/work/bm13805/.codex"
NODE_DIR="$HOME/.nvm/versions/node/v20.20.2/bin"
export PATH="$NODE_DIR:$PATH"
exec "$NODE_DIR/codex" "$@"
This shim is intentional. It lets the Desktop app detect and run Codex even when nvm is not initialized by a non-interactive SSH command, and it also moves CODEX_HOME onto the larger /user/work filesystem.
Diagnostics showing the difference between shell modes:
(agent-tracker) DL6H9DW2D1:agent-tracker bm13805$ ssh bp1 'bash -lc "echo \$PATH; command -v codex || true"'
/user/home/bm13805/bin:/user/home/bm13805/local/include:/system/steel-stack/slurm/23.11.6/bin:/user/home/bm13805/bin:/user/home/bm13805/local/include:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/lpp/mmfs/bin:/usr/lpp/mmfs/bin:/user/home/bm13805/.local/bin:/user/home/bm13805/.cargo/bin
/user/home/bm13805/.local/bin/codex
(agent-tracker) DL6H9DW2D1:agent-tracker bm13805$ ssh -tt bp1 'bash -lic "echo \$PATH; command -v codex || true"'
/user/work/bm13805/.pixi/bin:/user/home/bm13805/opt/pandoc/bin:~/.config/emacs/bin:~/bin:~/local/include:...:/user/home/bm13805/.nvm/versions/node/v20.20.2/bin:...:/user/home/bm13805/.local/bin:/user/home/bm13805/.cargo/bin
/user/home/bm13805/.nvm/versions/node/v20.20.2/bin/codex
Screenshots
The one that says "bp1" with the green dot is remote; there is no "Work locally" or "Worktree" dropdown.
<img width="832" height="201" alt="Image" src="https://github.com/user-attachments/assets/f5047c51-007e-4d67-b57c-b40d8deb5fd2" />
<img width="928" height="225" alt="Image" src="https://github.com/user-attachments/assets/6f969626-642c-4fde-b18d-547ba6fc7d39" />
7 Comments
Seems to be fixed in most recent version of codex app.
This is still missing for me, despite being on the latest macos version of the app. However, another workaround that can be done entirely from the desktop app is to just start a local chat, right-click it, and fork it into a new worktree.
I have the issue on "Version 26.609.41114 • Released Jun 12, 2026"
Still an issue for me on the latest version (osx).
This is still a problem.
As of the latest version, there is absolutely no way to create a worktree before starting a thread.
It only happens for remote conections, the worktree system works flawlessly for local projects.
This worked perfectly fine last week.
Yes this issue is back for me too. Starting a remote session with codex cli while I'm in an interact ssh session creates a chat I can see in the app, in the place where I called codex.
Seems solved with
26.616.51431.