Skip to content

bug(chat): Codex landing connect shows no error, chat header stuck on "codex - not running" #726

Closed

Description

@omesser

What happened

On a Windows machine with Codex installed, with no Harness configured, Chat showed the big shiny connect landing. Pressing Codex:

  1. Produced no error / no failure toast.
  2. Dismissed the landing and bounced into the normal chat surface.
  3. The chat header showed codex - not running.
  4. Chat did not work (Harness never came up).

So the landing button looks successful while the session is dead.

Steps to reproduce

  1. Machine has Codex installed (PATH / install present).
  2. ai-buddy with no Harness configured (fresh / unset).
  3. Open Chat → see connect landing (“Connect a Harness to get started”).
  4. Press Codex.

Expected

Either:

  • Codex starts and the header shows it running, or
  • Connect fails loudly (error / stay on landing / actionable message) and does not pretend the session is connected.

Actual

Silent “success” path into chat with header codex - not running; no usable Harness session.

Environment

  • OS: Windows (DESKTOP-UQIE144)
  • Reporter: Oded, live repro 2026-09-15

Notes / likely area

Landing connect buttons in src/chat.html (data-harness="codex"). Failure from spawn / ACP handshake / PATH resolution is probably being swallowed before the UI can show it.

Related context (not dupes): #554 (Codex spike), #166 (harness attach).

Done when

  • Failed Codex connect from the landing surfaces a clear error (or stays on landing) instead of a dead chat.
  • Header does not claim a Harness that is not running without an explanation.
  • Repro above either connects for real or fails visibly.

— Cursor agent (Coder), on @omesser's behalf.

Activity

  1. added
    bugSomething isn't working
    needs-triageMaintainer needs to evaluate this issue
    windowsRun the Windows compile job on this pull request
    on Sep 15, 2026
  2. added this to the V1 milestone on Sep 15, 2026
  3. omesser commented on Sep 15, 2026

    @omesser
    OwnerAuthor

    Console log (Windows repro)

    Reporter notes: looks like missing npx is not handled nicely in the UI. Log from the same session as the silent Codex landing connect:

    character: Buddy Bot from \\?\C:\tmp\ai-buddy\target\debug\characters\buddy-bot
    overlay: overlay-0 covers 3440x1440 at (0,0)
    overlay: overlay-1 covers 1200x1920 at (-1200,-209)
    overlay: 2 display(s); sprite 90x90; Buddy Bot as Buddy Bot
    harness: codex via `npx -y @agentclientprotocol/codex-acp@latest`
    harness: MCP server http://127.0.0.1:58931/mcp, or `C:\tmp\ai-buddy\target\debug\ai-buddy.exe --mcp-stdio` (relays here) for a Harness that advertises no mcpCapabilities.http
    harness: attaching now; the next `harness:` line on this stream is how it went
    director: model, ambient first 120s
    overlay: double-click interval 480ms
    harness: `npx` is not installed; ai-buddy does not bundle a Harness; StaticDirector is in force until it answers
    

    So the shell does know why attach failed (npx missing → StaticDirector), but Chat still dismissed the landing and showed codex - not running with no error. Done when should include: surface “npx is not installed” (or equivalent) in Chat when landing-connect fails for that reason.

    — Cursor agent (Coder), on @omesser's behalf.

  4. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Scope note from the #735 npx/acpx spike (Architect)

    This bug is the “declare loudly” follow-up for missing Node/npx (spike option 2). No separate issue opened.

    Please treat Done when as covering every npx-adapter preset, not only Codex:

    • claude → npx -y @agentclientprotocol/claude-agent-acp@latest
    • codex → npx -y @agentclientprotocol/codex-acp@latest
    • pi → npx -y pi-acp@latest

    Same failure mode: shell already prints `npx` is not installed; … StaticDirector is in force while Chat can dismiss the landing / show *- not running with no actionable copy.

    First-party ACP presets (cursor-agent, hermes, opencode, grok) and custom native ACP (e.g. copilot --acp --stdio) do not need this path — they fail on a missing CLI binary instead.

    Related: #735 (census), Architect comment on that issue.

    — Cursor agent (Architect), on @omesser's behalf.

  5. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Claiming this. Chat connect landing currently treats a Harness pick as ready as soon as Settings saves the name, while spawn_preflight still runs on another thread. Missing npx is logged and stored on HarnessInspect.missing, and Settings already names it. Chat's opening payload and landing do not.

    Fixing the shared Chat/Harness error path for every npx-adapter preset (claude, codex, pi). Linux CI plus automated tests. No Windows desktop gate and no windows label on the PR.

    — Cursor agent (Coder), on @omesser's behalf.

  6. self-assigned this
    on Sep 17, 2026
  7. moved this from 👷 Todo to 🏗 In Progress in Fidgeton Sep 17, 2026
  8. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Fix is in #831. Chat now stays on the landing when a pick cannot answer, and the header names a missing launcher (npx for the claude/codex/pi adapters).

    — Cursor agent (Coder), on @omesser's behalf.

  9. added a commit that references this issue on Sep 17, 2026
    3af5681
  10. moved this from 🏗 In Progress to 🏁 Done in Fidgeton Sep 17, 2026
  11. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Landed

    #831 merged. Chat connect landing now stays up when an npx-adapter pick (claude / codex / pi) cannot answer, and the header names the missing launcher (e.g. `npx` is not installed) instead of a silent dead chat.

    Acceptance on #726 is met. Issue closed via the PR.

    Project card: gh token lacks read:project / project scopes here, so Status → Done needs a manual nudge if the card is still In Progress.

    — Cursor agent (Coder), on @omesser's behalf.

  12. omesser commented on Sep 17, 2026

    @omesser
    OwnerAuthor

    Shipped on main via #831 (merged 2026-09-17).

    What landed:

    • Chat connect landing stays up when a pick cannot answer; composer stays "Nothing can answer yet".
    • Header / landing name a missing launcher (e.g. `npx` is not installed for the claude/codex/pi adapters), same reason Settings already used.
    • ChatOpening carries missing; canAnswer requires a live child with no missing launcher.
    • Covers every npx-adapter preset; first-party ACP missing-binary path also fails visibly instead of silent-succeeding into a dead chat.

    Done-when from this issue is met. Auto-closed by the merge.

    — Cursor agent (Coder), on @omesser's behalf.

  13. added a commit that references this issue on Sep 23, 2026
    80fb02b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingharnessneeds-triageMaintainer needs to evaluate this issuewindowsRun the Windows compile job on this pull request

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions