codex - 💡(How to fix) Fix Codex App remote Windows project folder validation fails even though the folder exists

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: app-server control socket is already in use at C:\Users<REMOTE_USER>.codex\app-server-control\app-server-control.sock

Code Example

このリモートホスト上の既存のフォルダーを選択してください

---

Authenticated to <REMOTE_HOST> using "publickey".

---

codex-cli 0.130.0

---

C:\Users\<REMOTE_USER>\<PROJECT_DIR>    true
C:/Users/<REMOTE_USER>/<PROJECT_DIR>    true

---

C:\Users\<REMOTE_USER>\<PROJECT_DIR>
C:/Users/<REMOTE_USER>/<PROJECT_DIR>

---

Error: app-server control socket is already in use at C:\Users\<REMOTE_USER>\.codex\app-server-control\app-server-control.sock

---

Host <REMOTE_ALIAS>
  HostName <REMOTE_HOST>
  User <REMOTE_USER>
  IdentityFile ~/.ssh/<PRIVATE_KEY>
  IdentitiesOnly yes
  AddKeysToAgent yes
  UseKeychain yes

---

ssh -o BatchMode=yes <REMOTE_ALIAS> exit

---

New-Item -Path "HKLM:\SOFTWARE\OpenSSH" -Force | Out-Null

New-ItemProperty `
  -Path "HKLM:\SOFTWARE\OpenSSH" `
  -Name DefaultShell `
  -Value "C:\Program Files\Git\bin\bash.exe" `
  -PropertyType String `
  -Force

New-ItemProperty `
  -Path "HKLM:\SOFTWARE\OpenSSH" `
  -Name DefaultShellCommandOption `
  -Value "-lc" `
  -PropertyType String `
  -Force

Restart-Service sshd

---

ssh <REMOTE_ALIAS> 'echo shell-ok; pwd; command -v sh; command -v codex; codex --version'

---

shell-ok
/c/Users/<REMOTE_USER>
/usr/bin/sh
/c/Users/<REMOTE_USER>/AppData/Roaming/npm/codex
codex-cli 0.130.0

---

ssh <REMOTE_ALIAS> 'node - <<'"'"'NODE'"'"'
const fs = require("fs");
for (const p of [
  String.raw`C:\Users\<REMOTE_USER>\<PROJECT_DIR>`,
  "C:/Users/<REMOTE_USER>/<PROJECT_DIR>"
]) {
  const s = fs.statSync(p);
  console.log(`${p}\t${s.isDirectory()}`);
}
NODE'

---

C:\Users\<REMOTE_USER>\<PROJECT_DIR>    true
C:/Users/<REMOTE_USER>/<PROJECT_DIR>    true

---

C:\Users\<REMOTE_USER>\<PROJECT_DIR>

---

C:/Users/<REMOTE_USER>/<PROJECT_DIR>

---

このリモートホスト上の既存のフォルダーを選択してください

---

Error: app-server control socket is already in use at C:\Users\<REMOTE_USER>\.codex\app-server-control\app-server-control.sock
RAW_BUFFERClick to expand / collapse

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

26.506.31421

What subscription do you have?

Enterprise

What platform is your computer?

Local machine: Darwin 24.6.0 arm64 arm Remote host: Windows via OpenSSH_for_Windows_9.5

What issue are you seeing?

Codex App can connect to a Windows OpenSSH remote host using public-key authentication, but it rejects an existing remote project folder during "Add remote project".

The UI error is:

このリモートホスト上の既存のフォルダーを選択してください

SSH authentication succeeds:

Authenticated to <REMOTE_HOST> using "publickey".

The remote Codex CLI is available:

codex-cli 0.130.0

The target folder exists from the remote Windows Node.js runtime:

C:\Users\<REMOTE_USER>\<PROJECT_DIR>    true
C:/Users/<REMOTE_USER>/<PROJECT_DIR>    true

However, Codex App still rejects both path formats:

C:\Users\<REMOTE_USER>\<PROJECT_DIR>
C:/Users/<REMOTE_USER>/<PROJECT_DIR>

The remote app-server log repeatedly contains:

Error: app-server control socket is already in use at C:\Users\<REMOTE_USER>\.codex\app-server-control\app-server-control.sock

This appears to be a Windows remote app-server / folder validation issue rather than an SSH authentication or missing-folder issue.

What steps can reproduce the bug?

  1. On macOS, configure an SSH host in ~/.ssh/config:
Host <REMOTE_ALIAS>
  HostName <REMOTE_HOST>
  User <REMOTE_USER>
  IdentityFile ~/.ssh/<PRIVATE_KEY>
  IdentitiesOnly yes
  AddKeysToAgent yes
  UseKeychain yes
  1. Verify public-key SSH works from macOS:
ssh -o BatchMode=yes <REMOTE_ALIAS> exit
  1. On the Windows remote host, install Git Bash and configure Windows OpenSSH to use Git Bash as the default shell:
New-Item -Path "HKLM:\SOFTWARE\OpenSSH" -Force | Out-Null

New-ItemProperty `
  -Path "HKLM:\SOFTWARE\OpenSSH" `
  -Name DefaultShell `
  -Value "C:\Program Files\Git\bin\bash.exe" `
  -PropertyType String `
  -Force

New-ItemProperty `
  -Path "HKLM:\SOFTWARE\OpenSSH" `
  -Name DefaultShellCommandOption `
  -Value "-lc" `
  -PropertyType String `
  -Force

Restart-Service sshd
  1. Verify the remote shell and Codex CLI:
ssh <REMOTE_ALIAS> 'echo shell-ok; pwd; command -v sh; command -v codex; codex --version'

Example sanitized output:

shell-ok
/c/Users/<REMOTE_USER>
/usr/bin/sh
/c/Users/<REMOTE_USER>/AppData/Roaming/npm/codex
codex-cli 0.130.0
  1. Verify the target folder exists from the remote Node.js runtime:
ssh <REMOTE_ALIAS> 'node - <<'"'"'NODE'"'"'
const fs = require("fs");
for (const p of [
  String.raw`C:\Users\<REMOTE_USER>\<PROJECT_DIR>`,
  "C:/Users/<REMOTE_USER>/<PROJECT_DIR>"
]) {
  const s = fs.statSync(p);
  console.log(`${p}\t${s.isDirectory()}`);
}
NODE'

Example sanitized output:

C:\Users\<REMOTE_USER>\<PROJECT_DIR>    true
C:/Users/<REMOTE_USER>/<PROJECT_DIR>    true
  1. Open Codex App on macOS.
  2. Go to Settings > Connections.
  3. Add or enable the SSH host <REMOTE_ALIAS>.
  4. Try to add a remote project using either:
C:\Users\<REMOTE_USER>\<PROJECT_DIR>

or:

C:/Users/<REMOTE_USER>/<PROJECT_DIR>
  1. Codex App rejects the folder with:
このリモートホスト上の既存のフォルダーを選択してください

What is the expected behavior?

Codex App should accept the existing Windows remote folder and add it as a remote project.

If the remote app-server socket is stale, occupied, or otherwise unusable, Codex App should show a clear app-server/socket error and recover or restart the remote app-server, rather than reporting that the folder does not exist.

Additional information

Remote app-server log:

Error: app-server control socket is already in use at C:\Users\<REMOTE_USER>\.codex\app-server-control\app-server-control.sock

I tried:

  • restarting Codex App
  • deleting and re-adding the SSH remote host in Settings > Connections
  • verifying SSH public-key authentication with BatchMode=yes
  • verifying that the remote Codex CLI is available on PATH
  • verifying that the target folder exists from the Windows Node.js runtime
  • trying both backslash and forward-slash Windows path formats
  • stopping stale remote Codex app-server processes
  • deleting the stale app-server control socket

The issue still reproduces.

Related issues that seem similar but not identical:

I have intentionally redacted the real username, hostname, private IP address, key path, and project name.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex App remote Windows project folder validation fails even though the folder exists