Skip to main content
The openclaw harness runs an OpenClaw agent inside a prepared environment’s container, driving the model-under-test through tasks one at a time — commonly used for OpenClaw-style productivity / agentic-coding benchmarks (such as PinchBench and SkillsBench). You only need to provide the model’s access credentials; the harness handles the rest: it installs openclaw in the container, onboards your model to OpenClaw as a callable custom model, then runs the tasks one by one and collects the results. Credentials are passed on the command line via --model-base-url / --model-api-key, and both the openai-chat and openai-responses --model-api-protocol protocols are supported (openai-responses needs OpenClaw 2026.6.1 or later, newer than the default 2026.3.22 install).

Parameters

Pass a chunk of JSON via --harness-params '{...}', or write it into the harness.params block of the YAML given to --config; on shared keys the command line wins (deep-merge override). For merge and precedence, see the Harnesses overview.

Parameter reference

ParameterTypeDefaultChoices / valuesDescription
binarystringopenclaw—Name or full path of the openclaw executable; usually no need to change.
install_strategystringinstall_if_missing5 optionsHow to prepare openclaw in the container; 5 in total (see Install strategy below).
openclaw_versionstring2026.3.22—The openclaw version used when auto-installing; only takes effect when install_strategy triggers an install.
install_commandstring""—Custom install command. When empty, it is auto-assembled from openclaw_version as npm install -g openclaw@<version>.
upload_srcstring""—Only used when install_strategy is the upload strategy: the path to the openclaw executable on the local machine (the one running AgentCompass) to upload; required under that strategy.
upload_dststring/usr/local/bin/openclaw—Only used when install_strategy is the upload strategy: the destination path inside the container, which is also the openclaw path actually used at runtime.
setup_capsule_tagstring""node24-v1Optional predefined Node toolchain Capsule injected before installing openclaw, for images without a usable Node.js / npm (see Install strategy below).
provider_idstringvllm—The name your model is registered under in OpenClaw; keep the default unless you need to align with a name in existing config.
gateway_portint18789≥ 1The local port OpenClaw uses to reach your model; change it only if it conflicts with another service.
gateway_bindstringloopback—The gateway’s listen scope; defaults to loopback (localhost only).
openclaw_localbooltruetrue / falseWhether to run OpenClaw in local mode (—local); on by default.
brave_api_keystring—Injects a Brave Search API key into OpenClaw; when provided, OpenClaw can use Brave for web_search. When not explicitly provided, web_search may be limited or unavailable. See the OpenClaw Web Search documentation.
max_message_charsint131072≥ 1Maximum characters in a single message sent to the model; longer messages are automatically split into several sent in sequence.
max_tokensint0≥ 0Max output tokens for a single model reply; 0 means unset, using the model’s own default. See Context and token limits below.
context_windowint250000≥ 0Tells OpenClaw how long a context your model accepts; 0 means unset. For custom models, set the real value; see Context and token limits below.
provider_timeout_secondsint3600—How long the model service can stay idle before being reclaimed (seconds).
max_turnsint0≥ 0Maximum model calls per task; 0 means no limit. See Turn limit.
model_inputlist[]text, imageInput types declared for the model in openclaw.json. Set [“text”, “image”] for a vision model so view_image sends images to it directly. Empty keeps the OpenClaw default; text is required.

Install strategy

install_strategy decides how openclaw lands in the container:
  • install_if_missing (default) — installs only when openclaw is not present in the container. The install runs npm, so an image without openclaw must provide a Node.js that OpenClaw supports plus npm, or set setup_capsule_tag.
  • preinstalled — uses what’s already installed on the image; errors if absent.
  • auto — picks a strategy by environment (not a probing auto-install): host_process uses install_if_missing, other environments like docker use preinstalled.
  • install_always — reinstalls on every run (some benchmarks pin install_if_missing, in which case the benchmark’s setting takes precedence).
  • upload — instead of installing from npm, uploads an existing openclaw executable from your local machine (the one running AgentCompass) into the container: it uploads from upload_src to upload_dst, adds the executable bit, and uses that file at runtime (binary automatically points to upload_dst, no need to set it separately). Suited to containers that can’t reach npm, or when you want a self-compiled / pinned binary; upload_src is required in this case.
Setting openclaw_version is enough — install_command is auto-derived as npm install -g openclaw@<version>. Set install_command explicitly only when you need to point at an internal registry or a non-npm source. When the image has no usable Node.js / npm, set setup_capsule_tag (for example --harness-params '{"setup_capsule_tag": "node24-v1"}'): the harness first injects a Runtime Capsule that ships Node 24 and npm, runs install_command with it, and then launches openclaw through the Capsule. The preinstalled strategy never uses a Capsule, and install_if_missing skips it when the image already has openclaw. The SkillsBench docker recipe sets node24-v1 by default and installs 2026.7.1 unless a version is given.

Context and token limits

context_window and max_tokens are written into openclaw.json only when set greater than 0, and are independent of each other.
  • context_window — the model’s total context length (corresponds to vLLM’s --max-model-len). Setting it explicitly stops OpenClaw from falling back to an over-small default window when it can’t recognize the model-under-test, which would trigger context compaction prematurely. When the value is 0, AgentCompass does not write the field into openclaw.json and the window is left to OpenClaw: if OpenClaw has a built-in context window for the model, it uses that built-in value; if it’s an unrecognized custom model, it falls back to a smaller default window and may compact the context before it has actually exceeded the limit, losing information and hurting long-task performance. Passing the model-under-test’s real context length explicitly during evaluation is therefore recommended.
  • max_tokens — the per-turn completion budget; it should be noticeably smaller than context_window so that “input tokens + max_tokens” doesn’t exceed the served context length. When the value is 0 it is likewise not written into openclaw.json, and the model / server’s own default output limit applies.

Turn limit

OpenClaw has no turn limit of its own. When max_turns is greater than 0, the harness installs and enables a small plugin under ~/.openclaw/extensions/agentcompass/ that counts model calls and ends the openclaw process before call max_turns + 1 is sent. This matches the step_limit of mini-SWE-agent: one model call is one turn however many tools it requests, all prompts of a task share the limit, and retries inside a model request are not counted. Reaching the limit records ERROR harness_max_iterations, and the output is still collected and scored. This requires OpenClaw 2026.5.7 or later and openclaw_local: true; other setups fail with an error. The default openclaw_version is older, so set it as well.

Session transcript

Results are collected from the session OpenClaw stores on disk. Releases that write ~/.openclaw/agents/<agent>/sessions/<session>.jsonl are read from that file; releases that keep the conversation in the agent’s SQLite session database (~/.openclaw/agents/<agent>/agent/openclaw-agent.sqlite) are read from a copy of that database. A transcript the harness cannot read leaves the trajectory empty without failing the run. Each step’s tools lists the tool definitions offered to the model. On OpenClaw 2026.7.1 or later, the same plugin as the turn limit saves the definitions the agent hands to the model (the llm_input hook, which the harness allows with plugins.entries.agentcompass.hooks.allowConversationAccess). Otherwise they come from the run’s trajectory, which OpenClaw records only in part: it keeps at most 64 objects and 6 levels per event, so complete definitions survive only on some releases. When Tool Search hides part of the catalog, which it does by default on recent releases such as 2026.9.36 and 2026.10.10, OpenClaw’s record of the tools the model saw is cut short, so tools stays empty. A run stopped at max_turns ends before OpenClaw writes its trajectory, so its tools stays empty as well. telemetry.tool_definitions_source names the source: llm_input, trajectory, unavailable_tool_search or unavailable.

Run examples

Pass openclaw as the second positional argument in this command:
Pass Harness configuration through --harness-params.
OpenClaw is already installed on the image — run with the default parameters.
Set the task execution deadline through --execution-params with run_timeout_seconds and run_timeout_multiplier. See phase timeouts.