Repository navigation
Description
Problem
Spawning a Harness CLI that is not on PATH fails as a generic start error. Chat Connect and the Completer source row do not treat that as "this machine does not have that CLI."
A Harness is supplied by the user and never bundled. Named Connect buttons and Settings presets still offer Claude Code, Codex, Grok, Hermes, OpenCode, and Pi regardless. Clicking one persists the Completer source, then spawn fails.
Two spawn paths:
- ACP attach (
Launch::command→Wire).argv[0]missing becomescould not start: … (os error 2). The session then backs off from 5s to 5 minutes (a_missing_binary_backs_off_instead_of_respawning). Settings copy is "set but not running"; the Director stays on that handle and runs Static until something answers. - Chat Connect login (
harness_login).codex login,grok login,opencode login, and the restspawnthe vendor binary detached. Missing file becomesCould not connect to Codex: could not start codex: No such file or directory (os error 2).select_harnesshas already written the preset.
Codex (and Claude, Pi) make this worse: ACP is npx -y @agentclientprotocol/…@latest, login is a different argv (codex login, claude /login). npx can exist while codex does not, so attach and login disagree about whether the CLI is there.
Expected
- Detect
ENOENT/ equivalent on the binary actually being spawned, for both ACP attach andharness_login. - Tell the user the CLI is not installed, name the command, and that ai-buddy does not bundle it. An OS errno is not that sentence.
- Do not treat a missing binary as a child that might come back. No backoff loop. Completer source should not sit in "set but not running" for a CLI this machine has not got.
- Chat Connect must not claim login started, and must not leave a preset selected, if the login binary was not there to spawn.
- Where ACP argv and login argv differ, say which of the two is missing.
Platform
Any. Observed next to the Codex Connect path on macOS (#655). grok / hermes / opencode fail the same way if those binaries are absent.
Related
- ADR-0018 (Harness supplied by the user, never bundled)
harness_logininsrc-tauri/src/main.rsLaunch::command/Wirespawn insrc-tauri/src/harness.rsandsrc-tauri/src/acp_wire.rs- Settings "set but not running" copy in
src-tauri/src/settings.rs(the "machine has not got" case already named in a comment) - fix(harness): Auth started by a Harness subprocess does not finish the handshake #655 (auth handshake after a CLI does start)
— Cursor agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
fix(harness): Tell a missing CLI from a dead child