Client or integration
CLI
Area
CLI
Summary
Running ocx or ocx start from a working directory that has been deleted or unlinked causes two chained failures:
- Startup crash dump to stderr: in src/update/notify.ts and src/cli/star-prompt.ts, checking process.stdin.isTTY triggers Bun's lazy initialization of new tty.ReadStream(0). Bun's stream constructor attempts to validate path "" against process.cwd(). Because the working directory was unlinked, libuv's uv_cwd fails with ENOENT: process.cwd failed with error no such file or directory, uv_cwd.
- Dashboard update check failure: the proxy daemon remains running in the background with a deleted cwd. When the GUI dashboard queries GET /api/update/check?tag=latest, the server executes spawnSync for npm view. Because the parent process cwd is deleted, spawnSync fails, returning latestVersion: null and reason "latest_unavailable". The dashboard displays: "Could not read the latest version from npm. Try again later."
Reproduction
- Open a terminal and create a temporary directory:
mkdir -p /tmp/stale-workdir && cd /tmp/stale-workdir
- Remove that directory from another process or terminal window:
rmdir /tmp/stale-workdir
- Run ocx start in the original terminal.
- Observe the ENOENT process.cwd error dump from internal:fs/streams via interactiveGuardOk.
- Open the dashboard update modal at http://localhost:10100/ and observe that the latest version check fails with reason latest_unavailable.
Version
2.41.0
Operating system
macOS 15.x / Linux / POSIX
Provider and model
N/A
Logs or error output
53 | function ReadStream(path, options) {
54 | if (!(this instanceof ReadStream))
55 | return new ReadStream(path, options);
56 | options = copyObject(getStreamOptions(options)), options.decodeStrings = !0;
57 | let { fd, autoClose, fs: customFs, start, end = @Infinity } = options;
58 | this[kFs] = customFs || fs, this.fd = null, this.path = getValidatedPath(path);
^
error: ENOENT: process.cwd failed with error no such file or directory, the current working directory was likely removed without changing the working directory, uv_cwd
at ReadStream (internal:fs/streams:58:77)
at new ReadStream (node:tty:11:23)
at interactiveGuardOk (.../src/update/notify.ts:126:40)
at shouldConsider (.../src/update/notify.ts:139:8)
at maybeShowUpdatePrompt (.../src/update/notify.ts:233:22)
at handleStart (.../src/cli/index.ts:310:9)
Redacted configuration
No response
Checks
Client or integration
CLI
Area
CLI
Summary
Running ocx or ocx start from a working directory that has been deleted or unlinked causes two chained failures:
Reproduction
mkdir -p /tmp/stale-workdir && cd /tmp/stale-workdir
rmdir /tmp/stale-workdir
Version
2.41.0
Operating system
macOS 15.x / Linux / POSIX
Provider and model
N/A
Logs or error output
Redacted configuration
No response
Checks