Skip to content

fix(harness): A missing Harness CLI is treated as a dead child #659

Closed

Description

@omesser

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 becomes could 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 rest spawn the vendor binary detached. Missing file becomes Could not connect to Codex: could not start codex: No such file or directory (os error 2). select_harness has 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 and harness_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_login in src-tauri/src/main.rs
  • Launch::command / Wire spawn in src-tauri/src/harness.rs and src-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.

Activity

  1. added this to the V1 milestone on Sep 13, 2026
  2. moved this from 👷 Todo to 🏗 In Progress in Fidgeton Sep 13, 2026
  3. moved this from 🏗 In Progress to 🏁 Done in Fidgeton Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions