agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

bug(dev): worker environments have no Go toolchain, so the desktop app cannot be launched and frontend changes cannot be verified

Open homeshrawat opened this issue 3 months ago • 2 comments

Summary

Worker environments have no Go toolchain, so npm run dev cannot build the daemon and the desktop app cannot be launched. Frontend changes therefore cannot be visually verified by the agent making them, and frontend PRs land unit-tested only.

This conflicts with the repository's own instruction in CLAUDE.md:

When showing or demoing frontend changes, run ao preview [url] from inside the session so the change renders in the desktop browser panel … do not just describe it.

What happens

  1. npm run dev → electron-forge start → build hook runs frontend/scripts/build-daemon.mjs
  2. That script requires Go. backend/go.mod specifies go 1.25.7; which go finds nothing, and searches across homebrew, mise, asdf and mdfind come back empty
  3. The script emits a clear, actionable error: Go 1.25.7+ is required, but Go could not be started: …
  4. The agent works around it with --ignore-scripts, which skips the Go build and proceeds toward a daemon that does not exist — ending in the identity-mismatch failure reported in #2481, which surfaces only as a generic "AO daemon is not ready"

The clear error at step 3 is bypassed; the opaque one at step 4 is what the agent actually has to act on. It then spent roughly 35 consecutive tool calls escalating — AwaitShell polling, --remote-debugging-port=9222 with CDP /json/list, Playwright connectOverCDP, raw WebSocket driving, osascript window queries, sample process profiling — before abandoning verification and falling back to unit tests.

The skill forbids the workaround but offers no alternative

.agents/skills/ao-desktop-dev/SKILL.md is the canonical cross-agent workflow, and line 16 explicitly rules out the escape hatch the agent reached for:

Never try to attach an unpackaged Electron app directly to a packaged daemon from another checkout. The supervisor intentionally rejects daemon identity mismatches.

(The agent copied /Applications/Agent Orchestrator.app/Contents/Resources/daemon/ao into frontend/daemon/ao — precisely that. The resulting rejection is intended behavior, not a bug.)

But the skill documents only the happy path. It has no detection step for a missing toolchain, no supported fallback, and no "verification is unavailable here, stop and report" exit. A fully compliant agent that has read and obeyed line 16 still has nowhere to go, so it improvises anyway.

Confirmed remedy

Installing Go resolved this completely:

brew install go     # 1.26.5, satisfies the 1.25.7 minimum

The daemon then built on the first attempt, the desktop app launched, and a frontend change was verified by hand in the real app within minutes. The diagnosis is therefore confirmed: the toolchain was the only blocker.

Requests

  1. Provision Go in worker environments, so the documented dev path works where the docs say it does.
  2. Add a failure branch to ao-desktop-dev: how to detect a missing toolchain, what the supported remedy is (install Go), and when to stop and report verification as unavailable rather than improvise.
  3. Make the --ignore-scripts dev path fail loudly instead of proceeding toward the opaque mismatch in #2481. The build script's own error message is good; the problem is that bypassing it leads somewhere unreadable.

Related

  • #2481 — daemon identity-mismatch error silently swallowed by a generic "AO daemon is not ready"

Environment

  • macOS (darwin 23.6.0), cursor harness worker
  • Repo at 3934bc86a

homeshrawat avatar Aug 05 '26 23:08 homeshrawat

Thanks for contributing to Agent Orchestrator.

This issue is being picked up by the current external contributor on-call pair:

  • @illegalcall
  • @somewherelostt

If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @somewherelostt here.

For faster context or live questions, you can also join the AO Discord.

Join the session here: https://discord.gg/H6ZDcUXmq

Come by if you want to see what is being built, ask questions, or just hang around with the community.

somewherelostt avatar Aug 06 '26 15:08 somewherelostt

Installing Go resolved the incident

Vaibhaav-Tiwari avatar Nov 02 '26 11:11 Vaibhaav-Tiwari