Repository navigation
Epic: agents over ACP — opencode and Claude Code in workflows #62
Description
What to build
Workflows can run on opencode and Claude Code, chosen per call, schedule, workflow or config,
through one generic ACP (Agent Client Protocol) adapter. It replaces @tanstack/ai-opencode and
its in-sandbox opencode serve. The approach comes from the sibling project canvas, and the
spike in finding 13 proved it on factory's real runtime: both agents completed a two-step
workflow with a chosen model, tier-1 structured output and permission answered client-side, and
cancelled in 2–3 ms with no process left.
Decisions
- ADR 0013 (proposed) —
docs/adr/0013-agents-over-acp.md:- one ACP adapter;
agentandmodelas separate fields, and factory always sends a model (a model never
carries across a change of agent);- host agent settings ignored by default, configurable per agent (
hostSettings); - permission answered by the client;
contextandcostas their own fields onAgentStepFinished;- one process per step over stdio;
- structured output stays prompt-injected.
- It supersedes ADR 0007 and amends ADR 0012 §3/§6.
- Evidence:
docs/findings/13-acp-agents.md, including the settings-isolation addendum.
Stack
One stacked PR set, bottom to top. The spike and ADR form the base layer.
Subtasks
-
feat(runtime): production ACP adapter for opencode and Claude Code #63 (PR feat(runtime): production ACP adapter for opencode and Claude Code #69) — production ACP adapter (incl. host-settings isolation)
-
feat(workflow): choose agent and model separately, ACP as the default runtime #64 (PR feat(workflow): choose agent and model separately, ACP as the default runtime #71) — agent and model as separate fields, ACP as the default runtime (closes permissionMode is declared on the authoring surface and read by nobody #39, Add a config-level default agent model #40)
-
feat(events): context and cost per agent step, ACP-aware run detail #65 (PR feat(events): context and cost per agent step, ACP-aware run detail #72) — context and cost per step, ACP-aware run detail
-
refactor(runtime): remove the opencode adapter and in-sandbox serve #66 (PR refactor(runtime): remove the opencode adapter and in-sandbox serve #73) — remove the opencode adapter and in-sandbox serve
-
test(e2e): live validation of ACP agents, docs and ADR acceptance #67 (PR test(e2e): live validation of ACP agents, docs and ADR acceptance #77) — live validation, docs, ADR acceptance
-
fix(runtime): a SIGKILLed agent leaves its in-flight tool processes running #74 — killed agent leaves its tool processes behind (found in the live leg)
-
feat(web): choose agent and model in the New run dialog #75 — New run dialog: choose agent and model
Base PR: #68 (spike, finding 13, ADR 0013).
Activity