Macaron Artifacts
Architecture

Harness adapters

How native harnesses fit the shared server and WebUI contract.

Claude Code, Codex, OpenCode, pi, Hermes, and OpenClaw are peers inside one application. A conversation selects one adapter; no harness owns a separate page, port, package, or message store.

Adapter boundary

Each implementation in artifacts/src/server/harnesses exposes discovery metadata, optional Profile options, native turn startup, cancellation, approvals, and capability flags. Its native events are converted to AI SDK UI-message chunks without flattening text, reasoning, tool input, or approval boundaries.

HarnessConnectionDistinctive behavior
Claude CodeAgent SDKFine-grained text/thinking/tool events and native permission callback
Codexcodex app-server JSON-RPCNative plans, command/file/network approvals, and native Profile files
OpenCodeLocal OpenCode SDK serverText/reasoning deltas, tool snapshots, and provider/model overrides
piBundled pi SDKRaw tool argument deltas and SDK-level execution approval hook
HermesHeadless JSON-RPC gatewaySession resume, reasoning/tool events, and gateway approvals
OpenClawPinned Gateway clientGateway sessions and guarded metadata enrichment

Profiles

The Profile API is shared, while each adapter owns its fields. Codex reads and preserves native <name>.config.toml files; Claude Code supports main and subagent models, effort, Base URL, and API credentials; OpenCode and pi expose provider/model settings; Hermes and OpenClaw expose gateway and model overrides. Profile edits are captured for the next turn and never rewrite unrelated native configuration.

Metadata generation uses a disposable branch or fork with tools disabled. It cannot change the main session's history, files, or provider affinity. If metadata fails, the main response remains intact.

On this page