When to use a harness
Register an agent harness when a model family has its own native session runtime and the normal OpenClaw provider transport is the wrong abstraction:- a native coding-agent server that owns threads and compaction
- a local CLI or daemon that must stream native plan/reasoning/tool events
- a model runtime that needs its own resume id in addition to the OpenClaw session transcript
Where each section moved
Every section of the single-page version now lives on this page or on one of the eight child pages below. The anchors from the single-page version still resolve here.Core ownership contract
Agent harness core ownership — What core prepares beforerunAttempt, and the tool-policy, auth-bootstrap, session-ownership, and request-transport contracts a harness can declare.
- What core still owns
- Native tool-policy enforcement
- Harness-owned auth bootstrap
- Bound native session ownership
- Verified setup runtime artifacts
- Request-transport contract
- Per-turn temporal context
Harness registration
Register an agent harness — TheAgentHarnessV2 registration example, plus the optional isolated-completion and delegated-execution capabilities.
Harness selection and provider pairing
Agent harness selection policy — How OpenClaw picks a harness after provider and model resolution, and why a harness normally ships with a provider plugin.Attempt runtime helpers
Agent harness attempt runtime — Guarded input injection, tool-result middleware, terminal outcome classification, live token usage, and agent-end side effects.- Guarded active-run injection
- Tool-result middleware
- Terminal outcome classification
- Live output-token usage
- Agent-end side effects
User input and execution authority
Agent harness user input and execution authority — Blocking user-input surfaces, host tool capabilities, exec reviewer outcomes, and paired-device command authority.Native inventories
Agent harness native inventories — Read-only native model rows and MCP tool catalogs reported from a harness’s own runtime.Runtime configuration
Agent harness runtime configuration — Native Codex harness mode and strict provider, model, or per-agent runtime policy.Sessions and results
Agent harness sessions and results — Native session bindings and the transcript mirror, plus tool, media, terminal-outcome, and settled-turn results.- Native sessions and transcript mirror
- Tool and media results
- Terminal tool outcomes
- Settled tool finalization
Current limitations
- The public import path is generic, but some attempt/result type aliases still carry legacy names for compatibility.
- Third-party harness installation is experimental. Prefer provider plugins until you need a native session runtime.
- Harness switching is supported across turns. Do not switch harnesses in the middle of a turn after native tools, approvals, assistant text, or message sends have started.