How I AI
How I AI

What a harness is and how to build one with Claude Agent SDK

July 8, 2026

AI Summary

5 min read

A harness is just code around an AI agent that makes it more effective. That is the entire definition, stripped of the mystique that has grown around the term. The host of How I AI built one live on the episode to prove the point: a harness is not a product category or a new paradigm. It is a wrapper that constrains an agent to do a specific job in a specific way, and the payoff is consistency, control, and outcomes that general-purpose coding tools cannot guarantee on their own.

When a harness beats a general-purpose agent

The core insight is that general-purpose coding tools like Claude Code or Codex are powerful but undirected. You have to explain your intent every time, and the agent can wander. A harness solves that by encoding intent into the structure itself. The host chose debugging Sentry bugs for his product ChatPRD as the test case. The workflow was repetitive: a bug comes in, you investigate, find root cause, document it, create a Linear ticket, and sometimes follow up with customers. Doing that manually with a general-purpose agent meant re-prompting the same instructions, hoping the agent stayed on task, and manually checking that it did not accidentally ship a fix when it was only supposed to investigate.

Continue reading the full summary in the app — free to try.

Read Full Summary →

Free • No credit card required

What you'll learn

  • 1 (00:00) **What a Harness Is** - A harness is code around an AI agent that makes it more effective for a specific job
  • 2 (02:18) **When to Build a Harness vs. Use a General Tool** - Harnesses are for repeated, semi-deterministic workflows where you want to micromanage the process
  • 3 (04:34) **Choosing the Harness Use Case: Sentry Debugging** - Picked fixing bugs at ChatPRD as the first harness because it has a repeatable workflow
  • 4 (06:01) **Why a Harness Beats a General Coding Tool** - Harnesses let you micromanage the job for consistency and efficiency
  • 5 (08:04) **Demo: The Terminal UI Harness** - Shows the custom TUI built with the Ink library
  • 6 (11:12) **High-Level Architecture of the Harness** - Frontend TUI, each invocation is a "run" with specific input and flags
  • 7 (12:37) **Custom Prompting and Tool Policies** - The harness uses a custom system prompt specific to ChatPRD engineering, not a general coding prompt

+ Full timestamped outline available in the app

Show Notes

Everybody is saying, “It’s not the model, it’s the harness,” but almost nobody stops to explain what a harness actually is. So I did. I built one live on the show: a Sentry bug-debugging harness for my company ChatPRD, using the Claude Agent SDK, a custom terminal UI built with the Ink library, and opinionated adapters for Sentry, Linear, GitHub, and Vercel. The harness handles evidence gathering, root-cause analysis, and follow-up artifact creation, all without me needing to type “dear agent, please fix this bug” ever again. I also walk through the architecture, share the code structure, and give you the exact process I used so you can build your own harness for any repetitive, structured workflow in your business.


What you’ll learn:

  1. What a harness actually is
  2. When to build a harness versus when to stick with a general-purpose tool like Claude Code or Codex
  3. How to encode specific permissions into a harness
  4. The three components every harness needs
  5. How I used GPT-5.5 and Claude Opus to build the harness code itself (and where they both initially resisted)
  6. How to structure the artifacts your harness produces so the whole team can use the output

Brought to you by:

Bolt.new—Turn your idea into a real product

Customer.io—Build customer engagement campaigns from a single prompt

In this episode, we cover:

(00:00) What is an AI harness?

(03:19) When to build a harness

(04:33) Why Claire picked bug triage

(06:00) Why not just use Claude Code?

(07:48) Demo: The custom harness interface

(11:04) Architecture: runs, tasks, tools, and artifacts

(13:44) Building it with Codex and Claude

(15:08) Code map and file layout

(16:51) A look at the code

(19:18) The live investigation result

(21:01) How to build your own harness

Tools referenced:

• Claude Agent SDK (Anthropic): https://code.claude.com/docs/en/agent-sdk/overview

• Claude Sonnet 4.6 (model used inside the harness): https://www.anthropic.com/news/claude-sonnet-4-6

• Claude Opus (used to build the harness): https://www.anthropic.com/claude/opus

• GPT-5.5 (Codex, used to build the harness): https://

How I AI