Repository navigation
Description
Summary
Updating Codex on an enrolled native Windows machine fails before the updater starts with File not found: . bb correctly discovers the native codex.exe, but its maintenance bridge discards that path and asks node-pty to spawn the extensionless codex command instead.
Versions and environment
- bb 0.46.0, npm installation; currently the latest published desktop release.
- Enrolled native Windows machine connected to a remote bb server. The Windows build number was not captured.
- Node v24.19.0; Codex CLI 0.160.0, installed as a native executable under
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe. - Latest upstream
mainchecked:e9dafb6c0245a37c6972dffa71134d546f3d497e. The faulty plan is still present. A new regression test against this commit fails because the plan returnscommand: "codex"despite discovering an absolute executable path. - The live Windows reproduction below comes from the original investigation on 0.46.0. The new main regression was run on macOS; I have not run a rebuilt main daemon on Windows.
Steps to reproduce
- Enroll a native Windows machine with a native Codex installation on PATH, older than the version offered in Settings → Updates.
- Run
bb machine list --jsonand obtain the Windows host ID. - Run
bb updates status --json. Confirm that Codex has an absolute.exeexecutablePathand an available update action. - Run
bb updates apply --machine <windows-host-id> --json.
A download is unnecessary to isolate the startup failure. From the Windows bb npm installation directory, save and run this as repro.cjs with node repro.cjs:
const pty = require('./node_modules/node-pty');
(async () => {
for (const command of ['codex', 'codex.exe']) {
await new Promise((resolve) => {
try {
const child = pty.spawn(command, ['--version'], {
cwd: process.cwd(), env: process.env, cols: 120, rows: 30,
});
let output = '';
child.onData((text) => { output += text; });
child.onExit(({ exitCode }) => {
console.log(JSON.stringify({ command, exitCode, output }));
resolve();
});
} catch (error) {
console.log(JSON.stringify({ command, error: error.message }));
resolve();
}
});
}
})();Expected vs actual
Expected: the update plan launches the executable bb already discovered, with update as a separate argument.
Actual bb output:
{
"results": [
{
"hostId": "host_cduug7iwc9",
"hostName": "Dillon-Workstation",
"provider": "codex",
"success": false,
"message": "File not found: "
}
]
}In the original node-pty experiment, codex --version throws File not found: , whereas codex.exe --version and the absolute codex.exe path both exit 0 and print codex-cli 0.160.0. Codex remains at 0.160.0 after the failed bb update.
Evidence
- Original bb investigation:
@thread:thr_az4irtcrs4, environmentenv_czptshjzfg, Windows hosthost_cduug7iwc9. - Update command hardcodes the extensionless name.
- Status discovers the executable path.
- Run plan ignores that path.
- Daemon passes the command directly to node-pty.
- New public maintenance-boundary regression: real scratch executables on PATH, including a directory with spaces. Discovered absolute path is correct;
getCodexProviderInstallationRun("update")returns the bare name. 12 other tests pass, this regression fails on main.
What I ruled out
- Not a missing Codex installation: both the
.exename and absolute path launch successfully in the same node-pty environment. - Not a download/registry failure:
--versionreproduces the startup failure before any update download. - Not Provider CLI maintenance should recognize externally managed executables and defer to their package manager #3166: this concerns spawning a native Windows executable, rather than package-manager ownership policy.
- Searched open and closed issues for Windows Codex updates and
File not found, plus related Windows provider PRs; found no matching report.
Suggested priority and effort
Medium: blocks the bb Codex updater for native Windows installations; using the discovered executable path is a small provider-local fix. This report establishes process startup, not whether the subsequent vendor updater succeeds.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 13, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-codex, andpartial-repro; no existing classifications were replaced.codexinstead of the absolute path. Native Windows startup and vendor-update completion remain unverified.executablePath; the daemon forwards the resulting bare command directly to node-pty.mathias-pedersen commentedon Oct 19, 2026
We can reproduce the same launch failure on two Windows machines with bb 0.46.1 and npm-installed Codex. Using bb's bundled node-pty with read-only
--versioncommands:codexresolves to the extensionless npm shell shim and exits with code 2; the absolute path to that shim exits with code 193.codex.cmd --versionsucceeds in the same environment.claude --versionfail withFile not found:, while the full path toclaude.exesucceeds.This adds an npm-installed Codex case and a related Claude updater case to the native Codex case reported here. These checks establish process startup; we have not tested the proposed fix. Happy to test a fix against both installation types.
zom-2018 commentedon Oct 20, 2026
Same failure for Claude Code on bb
0.46.2-nightly.39288295552.1. Open PR #5429 only changesplugins/provider-codex, so it won't fix this one.%USERPROFILE%\.local\bin\claude.exe(2.1.302), which is on PATH.File not found:(empty path after the colon).claude updatefrom cmd on the same machine works (2.1.302 → 2.1.304).Cause, from the bundled
provider-claude-codehost:claudeExecutable()returns the bare string"claude"wheneverwhich("claude")finds it on win32. It only falls back to the absolute~/.local/bin/claude.exewhen PATH lookup fails. The run plan is{command: "claude", args: ["update"]}. node-pty'sget_shell_pathdoesn't apply PATHEXT, soclaude→File not found:. An npm-global install (claude.cmd) would hit the same problem.Suggested fix: same as #5429. Launch the resolved
executablePathin the Claude run plan, and maybe add a shared helper so Pi and other providers don't repeat this. Workaround for now: setBB_CLAUDE_CODE_EXECUTABLE=C:\Users\<user>\.local\bin\claude.exein the host daemon's environment.Fix provider updates on Windows by resolving installer commands befor…