Delegate coder turns to foreign harnesses, starting with Claude Code, with transcripts landing in threads #25

Closed AtlantisPleb opened this 3d ago 2 comments

Outcome

The coder drives a harness the user already pays for — Claude Code first (including Fable), then Codex and peers — as a compute lane. The owner can talk to Fable through openagents coder, with every turn captured into forge threads.

Contract

  • A typed harness adapter per foreign agent: launch, prompt, stream, interrupt, and a loss-accounted transcript capture into thread events. Capture is an adapter, not a scrape; a lossy mapping states its losses.
  • The adapter drives the harness under the user's own account and never takes custody of the foreign credential. Own-capacity-only and no-resale hold.
  • Model attribution stays honest: the thread records which harness and which effective model answered.
  • Children run as local harness processes first (no server change); they migrate onto the nested-thread ledger when it exists (OpenAgentsInc/openagents.com#203).

Source

OpenAgentsInc/openagents.com docs 2026-08-24-coder-first-cloud-complements.md section 5, lane 3. Part of the Coder v1 release arc.

  1. AtlantisPleb opened this issue 3d ago
  2. A AtlantisPleb Author 3d ago

    Claude Code lane landed on monorepo main in 24bc97f0b8: ClaudeCodeHarness in packages/openagents-cli/src/coder-delegate.ts, wired into the lane enum beside devin and opencode. It runs claude --print --output-format stream-json --verbose and maps the structured stream into the fleet's events (session, tool, text, tokens, error) rather than parsing prose — the same reason the Devin lane moved to ACP. Flags checked against claude --help on this machine.

    Both load-bearing rules are enforced: the child inherits the user's own claude environment and this session never reads, copies, or forwards a foreign credential; and attribution stays honest — Claude's own configuration picks the model, so the lane reports one only when the caller passed it explicitly and otherwise says it was not reported. 766 CLI tests green.

    Remaining for this issue: Codex and peer adapters, and the migration of children onto the nested-thread ledger once openagents.com#203 lands (in flight now).

  3. A AtlantisPleb Author 3d ago

    Claude Code and Codex both land, so the issue's named scope ('Claude Code first, then Codex and peers') is delivered.

    • Claude Code (24bc97f0b8): claude --print --output-format stream-json --verbose, mapped into the fleet's events.
    • Codex (c2b0889cdb): codex exec --json, newline-delimited events, same mapping. A sandbox rather than an approval mode, because codex exec has no approval flag and a delegated child has nobody to ask — it needs a stated boundary instead of a prompt, defaulting to workspace-write.

    Both contract rules hold in both lanes: the child runs under the user's own environment and this session never reads, copies, or forwards a foreign credential; and attribution stays honest — each lane reports a model only when the harness actually reports one, and says it was not reported rather than inventing a name.

    Flags were checked against claude --help and codex exec --help on the machine rather than assumed, which caught two invented ones before they shipped: a codex continue subcommand that does not exist, and codex exec --ask-for-approval, which fails the command outright. 831 CLI tests green.

    Children still run as local harness processes. Migrating them onto the nested-thread ledger is now possible — that ledger shipped as THREAD-003 (openagents.com#203) — and is the remaining work here if you want it tracked, along with any further peer harnesses beyond Claude and Codex.

  4. closed this as completed 3d ago
Sign in with GitHub to comment on this issue.