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 = true

For one run:

interpreter -c harness='"kimi-cli"' "solve this task"

Harness IDs

Harness IDWire APIRequest routeReference
unset or ""responsesResponses APINative Open Interpreter/Codex-compatible surface
unset or ""chatChat Completions compatibilityGeneric OpenAI-compatible chat providers
claude-codemessagesAnthropic Messages harnessClaude Code full agent surface
claude-code-baremessagesAnthropic Messages harnessClaude Code bare profile
deepseek-tuichatChat harnessDeepSeek TUI / CodeWhale
kimi-clichatChat harnessKimi Code CLI / GitHub
qwen-codechatChat harnessQwen Code / GitHub
swe-agentchatChat harnessSWE-agent / GitHub
minimalchatChat harnessOpen Interpreter minimal chat-tool surface
any other stringchatChat Completions compatibilityCustom 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:

Route Compatibility

Harness routing is strict:

Provider wire_apiCompatible harnesses
responsesNative only. claude-code and claude-code-bare are rejected because they require messages.
chatNative chat compatibility, deepseek-tui, kimi-cli, qwen-code, swe-agent, and minimal.
messagesclaude-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 familyDefault harness
Anthropic, Claude model ids, Anthropic base URL, or any messages providerclaude-code
Kimi/Moonshot provider ids, names, base URLs, or model idskimi-cli
Qwen/QwQ/DashScope provider ids, names, base URLs, or model idsqwen-code
DeepSeek provider ids, names, base URLs, or model idsdeepseek-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 = false
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.