AI Harnesses

AI Harnesses

The best AI harness for coding: which one should you pick?

Claude Code or Codex CLI in the terminal, Cursor in your editor, Aider or OpenCode when you pick the model yourself. The best AI harness per situation, plus the SDKs to build your own.

AI LLM AI Agents Harness Claude Code Codex Cursor Open Source

Lots of names, little overview

A new coding agent or agent framework appears every month. If you are looking for a harness, the names hide the differences.

Sort by what you want to control

There are three kinds of harness: ready-made tools, open-source harnesses you set up yourself, and SDKs you build one with. The choice follows from how much of the harness you want in your own hands.

A choice that fits the task

Once you know which kind you need, you compare three or four options and pick on what matters: the model, the control, and where your data goes.

The short answer

The best AI harness for coding is Claude Code or Codex CLI if you work in the terminal, and Cursor if you work in an editor. If you want to pick the model yourself, take an open-source harness such as Aider, Cline, or OpenCode. And if you are building an agent for something other than code, you start from an SDK such as the Claude Agent SDK, the OpenAI Agents SDK, LangGraph, or Pydantic AI.

A harness is the software around a language model that turns it into a working agent: the loop, the tools, the context management, and the limits. How that works is covered in what is an AI harness. This piece answers the question that comes next: which harnesses exist, and which one fits you?

The best AI harness per situation

No harness wins every task. Per situation, the pick is clear.

⚡

You write code in the terminal

Take Claude Code or Codex CLI. Both are strong at tasks that touch many files, and both read an instruction file from your repo. The gap between the two is smaller than the gap a good instruction file makes.

🖱️

You prefer working in an editor

Take Cursor. You see every change as it lands and pick a model from several providers per task. If you work in VS Code and don't want a new editor, Cline is the open-source alternative.

🔓

You want to pick the model yourself, or keep everything local

Take Aider, Cline, or OpenCode. You decide which model runs and where your data goes, local models included.

🧱

Your task is not code

An agent for customer questions, quotes, or your own systems is built on an SDK. Take the Claude Agent SDK or the OpenAI Agents SDK for a quick start, LangGraph if you want every step pinned down.

🧭

You don't know yet

Start with Claude Code or Cursor on a real task from your own work. You learn quickly where it gets in your way, and only then do you know what your own harness needs to do.

Three kinds of harness

The list of names gets manageable once you sort it by one question: how much of the harness do you run yourself?

1

Ready-made harnesses

You install them and start. The maker handles the loop, the tools, and the limits. You mostly handle the instructions and the permissions.

2

Open-source harnesses

Also ready to use, and the code is open. You pick the model, run them where you like, and can change them.

3

SDKs to build your own harness

Building blocks you write a harness with, using your own tools and limits, for a task no standard tool covers.

Ready-made coding harnesses

These are the harnesses most developers already use. They are built for one job, writing software, and they are good at it.

🟠

Claude Code

Anthropic's coding agent, built around the Claude models. Runs in the terminal, in your editor, and in the desktop app. Reads a CLAUDE.md file in your repo for your conventions and asks for permission before it does anything risky. Strong at long tasks that touch many files.

⚫

Codex CLI

OpenAI's coding agent for the terminal, built around OpenAI's models. The code is open source. Reads instructions from an AGENTS.md file, a format that many other tools now read too.

🔵

Gemini CLI

Google's open-source terminal agent, built around the Gemini models. Handy if your team already works in Google Cloud.

🖱️

Cursor

A code editor with an agent built in. You pick a model from several providers per task. A good fit if you prefer an editor over the terminal and want to see every change as it lands.

GitHub Copilot belongs on the same list: next to completions in your editor, it has an agent mode and an agent that works on an issue by itself and opens a pull request.

Open-source harnesses

Open source matters for two reasons. You are not tied to one model maker, and you can see and change what the harness does. The second one counts as soon as you want to know why an agent did something.

🧑‍💻

Aider

One of the first coding harnesses for the terminal. Works with almost any model and records every change as a git commit, so you can roll back any step.

🙌

OpenHands

Formerly OpenDevin. Runs the agent in an isolated container and comes with a web interface. A fit when you want agents to work on tasks on their own, away from your own machine.

🧩

Cline

A VS Code extension that puts every step in front of you: I want to change this file, I want to run this command. You bring your own API key, so you pick the model.

⌨️

OpenCode

A terminal agent that works with models from many providers, including local models. For anyone who wants the Claude Code or Codex way of working without being tied to one provider.

SDKs to build your own harness

A coding agent is a harness for one kind of work. If you want an agent that prepares quotes, handles tickets, or pulls data from your own systems, you build a harness for that task. For that you use an SDK that handles the groundwork, such as the loop.

🟠

Claude Agent SDK

The harness under Claude Code, available as a building block for Python and TypeScript. You get the loop, the context management, and the built-in tools, and you add your own tools and permissions.

⚫

OpenAI Agents SDK

A lightweight SDK from OpenAI for Python and TypeScript. Builds agents that hand tasks to each other, with guardrails that check input and output and tracing to see what happened.

🕸️

LangGraph

From the team behind LangChain. You describe the agent as a graph of steps with a shared state. Strong when you want to decide exactly which step follows which, and when a task must be able to pause until a person signs off.

🐍

Pydantic AI

A Python framework from the makers of Pydantic. Puts typed input and output first, so your code knows what an agent returns. Works with models from several providers.

An SDK gives you the loop. The rest is still your work: which tools the agent gets, what it may not do, how you catch errors, and how you see what it does. What that looks like is in building an AI agent.

The three kinds side by side

Ready-made Open source SDK
Examples Claude Code, Codex CLI, Gemini CLI, Cursor Aider, OpenHands, Cline, OpenCode Claude Agent SDK, OpenAI Agents SDK, LangGraph, Pydantic AI
Built for Writing software, from day one Writing software, with your own model Any task you define yourself
Model Usually the maker's own Your choice, local models too Your choice, sometimes with a preference
What you handle Instructions and permissions Instructions, permissions, model, and hosting Tools, limits, error handling, and monitoring
Skip it when Your task is not code You have no time to set it up An existing harness already does the job

Same model, different harness

Cursor, Cline, and OpenCode can all run a Claude model. They still behave differently: one reads more files before it starts, another asks for permission more often, a third keeps the conversation shorter to stay inside the context window. That difference lives in the harness.

That is why a model comparison tells you little about how a tool performs in your codebase. Try two harnesses on the same real task from your own work. And keep your instructions in a file in the repo, so they come along when you switch.

The model decides what an agent can do. The harness decides how much of that ends up in your codebase.

Whichever you pick, a harness only works well once you set it up for your own codebase, with instructions, tests, and limits. That work is called harness engineering.

Need an agent no standard tool can be?

We build custom harnesses: with your tools, your limits, and access to your own systems. And we set up your team’s coding agents for your codebase.

Conclusion: pick the kind first, then the name

New harnesses appear every month and the existing ones change fast. The three kinds stay. Decide first how much of the harness you want to run yourself, then compare the few options of that kind on a real task.

Frequently Asked Questions

What are the most popular AI harnesses?

The best-known ones are coding agents: Claude Code from Anthropic, Codex CLI from OpenAI, Gemini CLI from Google, Cursor, and GitHub Copilot. Well-known open-source harnesses are Aider, OpenHands, Cline, and OpenCode. To build their own harness, many teams use the Claude Agent SDK, the OpenAI Agents SDK, LangGraph, or Pydantic AI.

Is Claude Code a harness?

Yes. Claude Code is a harness around Anthropic's Claude models. The model predicts text; Claude Code runs the loop around it, gives the model tools to read and change files and run commands, manages the context, and asks for permission before risky actions. The same harness is available as the Claude Agent SDK to build with yourself.

Which AI harnesses are open source?

OpenAI's Codex CLI and Google's Gemini CLI are open source. Aider, OpenHands, Cline, and OpenCode are open-source harnesses that work with models from several providers. The SDKs for building your own harness, such as the OpenAI Agents SDK, LangGraph, and Pydantic AI, are open source too.

What is the best AI harness?

For coding, it is Claude Code or Codex CLI if you work in the terminal, and Cursor if you work in an editor. If you want to pick the model yourself, take an open-source harness such as Aider, Cline, or OpenCode. If your task is not code, build your own harness on an SDK such as the Claude Agent SDK or LangGraph. The gap between the common picks is smaller than the gap a well set-up repo makes, so always test on a real task from your own work.

How do you build your own AI harness?

Start from an SDK, for example the Claude Agent SDK, the OpenAI Agents SDK, or LangGraph. It gives you the loop: call the model, run the tool, send the result back. Then you add your own tools, define what the agent may not do, catch errors, and make sure you can see what it does in production. Only build your own harness when an existing one really cannot handle your task.

What is the difference between a harness and an AI agent?

An AI agent is a language model that can use tools to carry out a task. The harness is the software that makes that possible: the loop, the tools, the context management, and the limits. Claude Code and Cursor are harnesses; what you see working when you use them is the agent.

Let's discuss your project

From AI prototypes that need to be production-ready to strategic advice, code audits, or ongoing development support. We're happy to think along about the best approach, no strings attached.

010 Coding Collective free consultation
free

Free Consultation

In 1.5 hours we discuss your project, challenges and goals. Honest advice from senior developers, no sales pitch.

1.5 hours with senior developer(s)
Analysis of your current situation
Written summary afterwards
Concrete next steps