Covendocs

Harness Adapters

Connecting different AI providers as harnesses.

Harness Adapter Guide

Coven v0 supports Codex and Claude Code. This guide describes the current adapter shape and the bar for adding more harnesses.

Current Adapter Shape

A built-in harness adapter defines a compact launch contract.

Harness adapter fields
FieldPurposeConsumer
Stable Coven harness idNames the adapter in CLI and API requests.CLI/API
User-facing labelGives clients a readable display name.Client UI
Executable nameLets coven doctor detect the CLI on PATH.Doctor
Interactive prompt argsDefines the fixed argv prefix for live PTY sessions.Launcher
Non-interactive prompt argsDefines the fixed argv prefix for one-shot output capture.Launcher
Install/authentication hintExplains the next setup step when detection fails.Doctor

The current implementation expects the prompt to be the final command argument after any fixed prefix args.

Built-in Harnesses

Built-in harness adapters
HarnessHarness idExecutableInteractive prefix argsNon-interactive prefix argsSetup hint
CodexcodexcodexNoneexec --skip-git-repo-check --color nevernpm install -g @openai/codex; codex login
Claude CodeclaudeclaudeNone--printnpm install -g @anthropic-ai/claude-code; claude doctor

Compatibility Matrix

Harness compatibility expectations
SurfaceCodex (`codex`)Claude Code (`claude`)Requirement for another harness
Provider authcodex login; Coven does not read tokens.claude doctor; Coven does not read tokens.Auth remains provider-owned. No API key, OAuth token, account id, or org id is added to Coven requests.
Command constructionProgram codex; prompt is an argv element after fixed prefix args.Program claude; prompt is an argv element after fixed prefix args.Build with argv APIs only. No prompt execution through sh -c or equivalent shell interpolation.
Project root and cwdDaemon validates projectRoot and cwd before launch.Daemon validates projectRoot and cwd before launch.Launch must fail closed when cwd resolves outside the project root.
PTY lifecycleDaemon spawns and owns the PTY, input writer, and killer handle.Daemon spawns and owns the PTY, input writer, and killer handle.Adapter must work under daemon-owned PTY supervision and return clear spawn failures.
Event replayOutput and exit data are appended to the SQLite event log.Output and exit data are appended to the SQLite event log.Output must be replayable through GET /api/v1/events and coven attach after process exit.
Live inputPOST /api/v1/sessions/:id/input writes { data } to the live PTY.POST /api/v1/sessions/:id/input writes { data } to the live PTY.Live input must either work through the daemon PTY writer or be explicitly documented as unsupported before public support.
Live killPOST /api/v1/sessions/:id/kill uses the daemon killer handle and records killed.POST /api/v1/sessions/:id/kill uses the daemon killer handle and records killed.Kill must terminate only a daemon-verified running session and return 409 session_not_live otherwise.
Client compatibilityCovered by API/session docs and local smoke coverage.Covered by API/session docs and local smoke coverage.Update docs, daemon tests, smoke coverage, and client/plugin compatibility fixtures before advertising support.

Current, Future, and Unsupported Adapters

Harness support status
NameStatusReason
codexCurrentBuilt-in adapter and harness id in the daemon.
claudeCurrentBuilt-in adapter and harness id in the daemon.
HermesFuture / plannedDocumented as a candidate, not a current daemon adapter.
AiderFuture / plannedDocumented as a candidate, not a current daemon adapter.
Gemini CLIFuture / plannedDocumented as a candidate, not a current daemon adapter.
OpenCodeFuture / plannedDocumented as a candidate, not a current daemon adapter.
Custom local harnessFuture / designRequires a policy and compatibility story before broad support.
OpenClawNot a Coven harnessOpenClaw integration is an external client/plugin path through @opencoven/coven, not a daemon harness id.
Generic command adapterNot supported in v0Arbitrary commands need explicit policy, approval, and audit behavior before they can be safe.

Adapter Requirements

Before adding a new harness, confirm the readiness checks below.

Adapter readiness requirements
RequirementRisk areaAcceptance signal
CLI detection on PATHSetupcoven doctor can find the executable safely.
Prompt passed without shell interpolationCommand safetyLauncher builds argv directly and keeps the prompt as data.
Validated project cwdFilesystem policyThe process starts only after project-root and cwd checks pass.
PTY/session event captureObservabilityOutput and exit data become replayable session events.
Provider-owned authenticationCredentialsLogin remains in the harness provider flow.
coven doctor failure claritySetupMissing auth or executable states include actionable hints.
Command and missing-executable testsRegression coverageTests prove safe argv construction and understandable failures.

What Not to Add Yet

Avoid generic arbitrary command adapters until Coven has explicit policy and approval behavior for them.

Arbitrary commands are more dangerous than named harness adapters because they can blur the difference between "run a coding agent in this project" and "execute whatever string a client sent." Keep v0 narrow.

Future Harness Evaluation Checklist

For a candidate harness, document the evaluation packet.

Future harness evaluation packet
FieldGroupWhy it matters
Install commandSetupUsers need a repeatable path to get the CLI.
Executable nameSetupDoctor detection needs the exact binary name.
Local auth flowCredentialsProvider credentials must stay outside Coven.
One-shot prompt commandLaunch shapeNon-interactive runs need predictable output capture.
Interactive commandLaunch shapeLive PTY sessions need a stable argv shape.
Resume/session commandSession continuityNative upstream session ids may become useful metadata.
Non-interactive output modeOutputClients need clean logs without terminal control noise.
stdin prompt injection requirementLaunch shapestdin prompts have different safety and replay behavior.
Color/control sequence controlsOutputReplay and docs output should stay readable.
Shell quoting hazardsCommand safetyAdapters must avoid sh -c style prompt execution.
Known exit codesError handlingClients can translate failures into useful next steps.
Minimum safe smoke testRegression coveragePublic support needs proof beyond a maintainer machine.

Session Identity Mapping

Some harnesses have their own upstream session ids. Coven's session id remains the local runtime id.

If upstream ids become useful, store them as metadata rather than replacing Coven's own id. Clients should be able to rely on a stable Coven id for attach, events, archive, summon, and sacrifice.

Suggested Adapter Maturity Stages

Adapter maturity stages
StageNameProof required
1Research noteDocument CLI shape and risks.
2Command construction testsProve argv construction is safe.
3Doctor detectionAdd install and authentication hints.
4Launch smokeProve a session can run in a temporary project.
5Attach/replay smokeProve events can be replayed.
6Client compatibilityUpdate docs and integration tests.

Do not skip from research directly to public support.

Rendering diagram…

A harness skipping any stage is not ready for public support, even if it appears to work on a maintainer's machine.

Harness Adapter Model

Rendering diagram…

Last updated on

On this page