Skip to content
How I AIHow I AI

How to build a custom AI harness with Claude SDK

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: https://bolt.new/partner/howiai Customer.io—Build customer engagement campaigns from a single prompt: https://www.customer.io/howiai *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://openai.com/index/introducing-gpt-5-5/ • Ink (terminal UI library for Node.js): https://github.com/vadimdemedes/ink • Sentry (error monitoring): https://sentry.io/ • Linear (project management): https://linear.app/ • GitHub: https://github.com/ • Vercel: https://vercel.com/ *Where to find Claire Vo:* ChatPRD: https://www.chatprd.ai/ Website: https://clairevo.com/ LinkedIn: https://www.linkedin.com/in/clairevo/ X: https://x.com/clairevo _Production and marketing by https://penname.co/._ _For inquiries about sponsoring the podcast, email jordan@penname.co._

Claire Vohost
Jul 8, 202624mWatch on YouTube ↗

At a glance

WHAT IT’S REALLY ABOUT

Demystifying AI harnesses: build a bug-triage agent around Claude SDK

  1. A harness is simply code wrapped around an AI agent to make it more effective for a specific job by enforcing context, allowed actions, and expected outcomes.
  2. Harnesses are most valuable when a workflow repeats with consistent setup and deliverables, especially when you want a mix of deterministic steps and non-deterministic agent reasoning.
  3. Claire’s example harness targets Sentry bug triage at ChatPRD, integrating Sentry/Vercel/Linear/GitHub and producing consistent investigation artifacts instead of relying on ad-hoc prompting.
  4. Compared to using Claude Code or Codex directly, the custom harness increases speed and reliability by encoding intent, permissions (e.g., investigate-only vs fix), tool policies, and output formats.
  5. The build approach uses an Agent SDK for agentic planning plus opinionated API adapters and an artifact store, and was iterated with help from both Codex and Claude despite initial “too-deterministic” codegen tendencies.

IDEAS WORTH REMEMBERING

5 ideas

A harness is “structure around agency,” not a mysterious new model trick.

Claire frames a harness as straightforward wrapper code that supplies specific context, constrains actions, and standardizes outcomes so an agent performs reliably for one job-to-be-done.

Build a harness when you’re repeating the same workflow and deliverables.

If a task needs the same setup, tools, and outputs each time (and has both deterministic steps and open-ended reasoning), encoding it into a harness reduces re-explaining and babysitting.

Encode intent and permissions so you don’t have to prompt for them every run.

Her TUI supports explicit modes (e.g., “Investigate” vs “Fix”), preventing file edits unless allowed—control that would otherwise rely on fragile, repeat prompting.

Opinionated tool adapters can outperform general tool access for a narrow job.

Instead of letting an agent “wander” via generic MCP calls, she builds Sentry/Linear/Vercel/GitHub adapters that fetch only the bug-triage-relevant fields and actions, improving consistency and speed.

Artifacts turn one-off agent work into reusable organizational memory.

Each run saves evidence, summaries, and a structured report (including an HTML view) to a file-based artifact store, making investigations auditable and useful for future debugging.

WORDS WORTH SAVING

5 quotes

A harness is some code around an AI agent that makes it more effective.

Claire Vo

Everybody's saying, "It's not the model, it's the harness," but you know what not everybody is saying? What is a harness?

Claire Vo

It is just writing more code around your AI to make it more useful for a specific use case.

Claire Vo

So the harness is the whole experience, including the human experience that makes it more useful and easier to use.

Claire Vo

I've realized that these agents can help us solve very, very specific problems using other agents, and by constraining that work, we can actually get specific jobs done really efficiently, and then use the general purpose agent to sort of orchestrate it.

Claire Vo

Definition of an AI harnessWhen a custom harness is worth itBug triage as a harness use case (Sentry)Terminal UI (TUI) interface design with InkArchitecture: runs, tasks, tools, artifact storeTool adapters vs generic MCP usagePermissions/flags (investigate-only, patch mode, customer messaging)Multi-model/model selection and routingArtifact outputs: reports, HTML summaries, run logsBuild process with Codex/Claude + Agent SDK

High quality AI-generated summary created from speaker-labeled transcript.

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.