Skip to content

Epic: agents over ACP — opencode and Claude Code in workflows #62

Description

@FreshlyBrewedCode

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;
    • agent and model as 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;
    • context and cost as their own fields on AgentStepFinished;
    • 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

Base PR: #68 (spike, finding 13, ADR 0013).

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicA bigger unit of work, broken down into subtasks; closes when all subtasks are complete

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions