Harness
Harness mode is an Open Interpreter addition. It changes the model-facing prompt, tool schema, message conversion, and response handling while keeping the native Open Interpreter runtime.
The public runtime does not shell out to the real external agent CLI.
Configure
harness = "kimi-cli"
harness_guidance = trueFor one run:
interpreter -c harness='"kimi-cli"' "solve this task"Harness IDs
| Harness ID | Wire API | Request route | Reference |
|---|---|---|---|
unset or "" | responses | Responses API | Native Open Interpreter/Codex-compatible surface |
unset or "" | chat | Chat Completions compatibility | Generic OpenAI-compatible chat providers |
claude-code | messages | Anthropic Messages harness | Claude Code full agent surface |
claude-code-bare | messages | Anthropic Messages harness | Claude Code bare profile |
deepseek-tui | chat | Chat harness | DeepSeek TUI / CodeWhale |
kimi-cli | chat | Chat harness | Kimi Code CLI / GitHub |
qwen-code | chat | Chat harness | Qwen Code / GitHub |
swe-agent | chat | Chat harness | SWE-agent / GitHub |
minimal | chat | Chat harness | Open Interpreter minimal chat-tool surface |
| any other string | chat | Chat Completions compatibility | Custom marker; no built-in harness request builder |
Reference Projects
These links are the external products or repositories whose user-facing surfaces informed the corresponding harness modes:
- Claude Code from Anthropic.
- DeepSeek TUI, with product context at CodeWhale.
- Kimi Code CLI and its MoonshotAI/kimi-cli repository.
- Qwen Code CLI and its QwenLM/qwen-code repository.
- SWE-agent and its SWE-agent/SWE-agent repository.
Route Compatibility
Harness routing is strict:
Provider wire_api | Compatible harnesses |
|---|---|
responses | Native only. claude-code and claude-code-bare are rejected because they require messages. |
chat | Native chat compatibility, deepseek-tui, kimi-cli, qwen-code, swe-agent, and minimal. |
messages | claude-code and claude-code-bare only. Native mode is rejected because Messages requires a harness-native transport. |
This means an Anthropic-style provider normally needs:
model_provider = "anthropic"
harness = "claude-code"Most OpenAI-compatible hosted providers use wire_api = "chat" and can either
run through generic chat compatibility or through a matching chat harness.
Automatic Harness Defaults
When the config does not set harness, Open Interpreter may infer one from
the selected provider/model:
| Detected family | Default harness |
|---|---|
Anthropic, Claude model ids, Anthropic base URL, or any messages provider | claude-code |
| Kimi/Moonshot provider ids, names, base URLs, or model ids | kimi-cli |
| Qwen/QwQ/DashScope provider ids, names, base URLs, or model ids | qwen-code |
| DeepSeek provider ids, names, base URLs, or model ids | deepseek-tui |
Explicit harness = "..." always wins.
What Each Harness Changes
claude-code
Uses the Anthropic Messages API and builds Claude Code-shaped requests. It adds Claude Code headers, a Claude Code system prompt, Anthropic thinking configuration, context-management settings, title-generation requests, and a Claude-shaped tool surface.
It maps supported tools into Anthropic tool definitions and includes handlers for Bash/PowerShell, Read, Write, Edit, TodoWrite, Glob, Grep, web search/fetch, LSP, scheduled wakeups, and Claude-style subagents.
claude-code-bare
Uses the same messages route as claude-code, but with the bare Claude Code
profile. The bare profile uses a smaller prompt/profile shape and different
output config defaults.
kimi-cli
Uses Chat Completions-compatible requests with a Kimi CLI-shaped system prompt. It includes working-directory listing, AGENTS.md loading, Kimi skill discovery, prompt-cache keys, reasoning-effort mapping, and Kimi tool schemas.
Kimi tool handlers include Shell, ReadFile, WriteFile, StrReplaceFile, Glob, Grep, ReadMediaFile, SearchWeb, FetchUrl, SetTodoList, plan-mode controls, background task list/output/stop, AskUserQuestion, and Agent.
harness_guidance = true adds an extra reliability block for this harness.
deepseek-tui
Uses Chat Completions-compatible requests with a DeepSeek TUI/CodeWhale-shaped system prompt. It adds turn metadata, repository context, generated project instructions when none are found, and DeepSeek TUI tool schemas.
DeepSeek TUI tool handlers include shell, apply patch, edit/write/read file, list directory, grep/file search, git status/diff, diagnostics, checklist, plan, and tool search.
qwen-code
Uses Chat Completions-compatible requests with Qwen Code startup context. It adds a synthetic setup exchange containing date, OS, current directory, and a small folder listing before the user conversation.
Qwen handlers include read file, write file, edit, shell command, glob, grep, todo write, ask user question, plan exit, and agent.
swe-agent
Uses a SWE-agent-style discussion/command loop rather than tool schemas. The assistant response is parsed for a shell command, Open Interpreter injects the corresponding action, and command output returns as an observation. The default command timeout is 30 seconds.
minimal
Uses a compact software-agent system prompt and maps function tools into a plain Chat Completions tool list. It is useful when a provider supports chat tools but does not need a provider-specific harness surface.
Guidance
harness_guidance = true is enabled by default. Today it only adds extra
guidance for kimi-cli; other harnesses ignore it.
Disable it for a stricter harness-shaped run:
harness_guidance = falseRelated Config
model_provider = "moonshotai"
model = "kimi-k2.6"
harness = "kimi-cli"
[model_providers.moonshotai]
name = "Moonshot AI"
base_url = "https://api.moonshot.ai/v1"
env_key = "MOONSHOT_API_KEY"
wire_api = "chat"For provider and wire-api details, see Providers.