VS Code extension fails on multi-user Linux server with EACCES on /tmp/codex-ipc/*.sock

Open 💬 6 comments Opened Mar 22, 2026 by yiwufen

What version of the IDE extension are you using?

openai.chatgpt-26.5318.11754-linux-x64

What subscription do you have?

plus

Which IDE are you using?

VS Code Server / VS Code Remote

What platform is your computer?

Linux (multi-user shared server)

What issue are you seeing?

What do you see instead?

The extension fails with a permission error while trying to create a Unix socket under /tmp/codex-ipc.

Error log

2026-03-22 14:03:30.208 [error] [IpcRouterManager] Server error errorCode=EACCES errorMessage="listen EACCES: permission denied /tmp/codex-ipc/ipc-1002.sock" errorName=Error errorStack="Error: listen EACCES: permission denied /tmp/codex-ipc/ipc-1002.sock
    at Server.setupListenHandle [as _listen2] (node:net:1918:21)
    at listenInCluster (node:net:1997:12)
    at Server.listen (node:net:2119:5)
    at cf.startRouterIfNeeded (/home/lh/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/out/extension.js:188:17558)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Pa.connect (/home/lh/.vscode-server/extensions/openai.chatgpt-26.5318.11754-linux-x64/out/extension.js:188:19564)"


### What steps can reproduce the bug?

1. Use the OpenAI Codex / ChatGPT VS Code extension on a multi-user Linux server through VS Code Remote / vscode-server.
2. Open any workspace and start a Codex session from the extension.
3. The extension fails messages in vscode output Codex.

### What is the expected behavior?

The extension should start normally and create its IPC socket in a user-writable runtime directory.


### Additional information

_No response_

View original on GitHub ↗

6 Comments

xsun2001 · 3 months ago

I believe both vscode and codex cli respect TMPDIR env var. You can create your tmp dir at /tmp/<username>, append export TMPDIR=/tmp/<username> to bashrc, then restart vscode server to see if the issue is fixed.

yiwufen · 3 months ago

是的, export TMPDIR=/tmp/<username>, 解决了这个错误

panangam · 3 months ago

I couldn't get TMPDIR to work. What else do you need to do after adding that to bashrc?

fly-froever · 3 months ago

This issue was previously fixable by running export TMPDIR=/tmp/$USER, but this solution has stopped working in the past two days.

yiwufen · 3 months ago

确保其出现在.bashrc的开始

export TMPDIR=/tmp/$USER

If not running interactively, don't do anything

case $- in
i) ;;
*) return;;
esac

fly-froever · 3 months ago

Thanks a lot — this worked.

The issue was indeed caused by the non-interactive shell early return in ~/.bashrc. After moving export TMPDIR=/tmp/$USER to the top (before the case $- in ... return block), the environment variable is now correctly picked up by the Codex app-server.

Confirmed via:

  • echo $TMPDIR
  • /proc/<pid>/environ for the codex process

Really appreciate the help!