Skip to content
back to the map
concept
stage: understand
3 min read

Model, harness and provider

A coding agent is not just a model. It is a model plus a harness (the program that gives it tools, context and rules) reached through a provider. Most confusion in this field comes from mixing the three.

Claude CodeOpenCodeoh-my-pi (OMP)OpenRouterOllama

The three layers

  • Model: the neural network that predicts the next step (Claude, GPT, Gemini, DeepSeek, Qwen, and others). It reads text in and produces text out, including requests to call tools.
  • Harness: the program around the model. It builds the prompt, gives the model tools (read a file, edit, run a command, search, call an ), applies permissions, manages context, and loops until the task ends. Claude Code, OpenCode, and Codex CLI are harnesses.
  • Provider: where the model runs and how you reach it: the vendor's own API, a cloud (Bedrock, Vertex, Azure), a router (OpenRouter), or your own machine (Ollama, llama.cpp, vLLM).

Why the same model feels different in two tools

The harness decides what the model sees and what it can do. Two tools using the same model can differ a lot in how they edit files (whole-file rewrite versus targeted edits), how much of the repository they load, whether they use a language server to find definitions, how they recover from a failed command, and how they compress a long conversation. Reports of big quality differences between tools on the same model usually trace back to these details, not to the model.

The reverse also holds: a harness tuned for one model family may underperform with another, because prompts and tool formats are adjusted to each model's habits.

What a harness actually does

  • Assembles context: system prompt, project instructions (CLAUDE.md or ), open files, search results, conversation history.
  • Exposes tools with a schema: read, write, edit, shell, search, fetch, and any server you connect.
  • Enforces permissions: which commands run without asking, which paths are off limits, whether to sandbox.
  • Runs the loop: model proposes a tool call, harness executes it, result goes back to the model, repeat until done or stopped.
  • Manages cost and context: caching, summarizing old turns, switching to a cheaper model for small steps.

Why this matters when you choose

Choose the harness for the workflow (terminal or IDE, permission model, parallel work, extensibility) and the model for the job (quality, speed, price, privacy). Harnesses that support many providers let you change the model without relearning the tool; harnesses tied to one vendor can go deeper in integration. Neither is universally better. The next topics compare the common tools and the model trade-offs.

MCP servermodel context protocol serverA server that implements the Model Context Protocol, Anthropic's open standard that standardizes the conversation between an agent and external tools. The agent lists what is available, calls what it needs, receives the result, with no case-by-case integration. A well-written MCP server becomes reusable by Claude, Cursor, Cline and any compatible client.see in glossary →OMPoh-my-piAn open-source terminal coding agent that began as a fork of the minimal Pi agent and added structured edits, language-server and debugger operations, browser access, plugins and subagents.see in glossary →AGENTS.mdA file at the repository root with instructions for coding agents (commands, conventions, boundaries). A common convention across tools; Claude Code reads CLAUDE.md.see in glossary →MCPModel Context ProtocolAn open protocol for connecting agents to tools and data sources through servers. Every server you connect extends what the agent can do, so it also extends the attack surface.see in glossary →

connections on the map

updated on 14/10/2026 · sources to go deeper · report an error

Unlocks

test what you learned

Loading questions…