Skip to main content
How I AI

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

24 min episode · 2 min read
·
Claude Agent Sdk

Episode

24 min

Read time

2 min

Topics

Leadership, Artificial Intelligence, Software Development

AI-Generated Summary

Key Takeaways

  • Harness definition: A harness is simply code wrapped around an AI agent to make it more effective for a specific use case. It requires three components: specific context, specific actions, and specific outcomes. No AI is required inside the harness itself — the wrapper can be entirely deterministic logic surrounding an AI call.
  • When to build a harness: Build one when the same workflow requires the same setup and the same outputs repeatedly — bug triage, PR preparation, support escalation, migration management, or structured research. The trigger is any workflow combining deterministic steps with AI reasoning where consistency and repeatability matter more than open-ended flexibility.
  • Opinionated tool adapters over generic MCPs: Rather than giving the agent broad MCP access to Sentry or Linear, build narrow adapters that call only the specific API fields relevant to the task. This prevents the agent from wandering through irrelevant data and produces faster, more precise outputs without requiring additional prompting each run.
  • Encode permissions and outcomes in code, not prompts: Harnesses allow hard-coded tool policies — for example, an investigate-only mode that blocks file writes entirely. Desired artifacts like Linear tickets, HTML reports, and bug summaries are defined structurally in the harness, so they generate consistently without relying on the agent to remember instructions from a skill or system prompt.
  • Build with an agent SDK, prompt very specifically: When using Claude Agent SDK or OpenAI's equivalent to generate the harness itself, models default to overly deterministic outputs and resist embedding AI logic. Counteract this by specifying the exact workflow steps, tool list, custom prompt locations, and artifact structure before generating — vague prompts produce scaffolding without agentic behavior.

What It Covers

Host Christina Cacioppo demystifies the term "harness" by building a live Sentry bug-triage harness using the Claude Agent SDK, connecting it to Sentry, Vercel, Linear, and GitHub, and demonstrating how structured code around AI agents produces more consistent, controlled outcomes than general-purpose coding tools alone.

Key Questions Answered

  • Harness definition: A harness is simply code wrapped around an AI agent to make it more effective for a specific use case. It requires three components: specific context, specific actions, and specific outcomes. No AI is required inside the harness itself — the wrapper can be entirely deterministic logic surrounding an AI call.
  • When to build a harness: Build one when the same workflow requires the same setup and the same outputs repeatedly — bug triage, PR preparation, support escalation, migration management, or structured research. The trigger is any workflow combining deterministic steps with AI reasoning where consistency and repeatability matter more than open-ended flexibility.
  • Opinionated tool adapters over generic MCPs: Rather than giving the agent broad MCP access to Sentry or Linear, build narrow adapters that call only the specific API fields relevant to the task. This prevents the agent from wandering through irrelevant data and produces faster, more precise outputs without requiring additional prompting each run.
  • Encode permissions and outcomes in code, not prompts: Harnesses allow hard-coded tool policies — for example, an investigate-only mode that blocks file writes entirely. Desired artifacts like Linear tickets, HTML reports, and bug summaries are defined structurally in the harness, so they generate consistently without relying on the agent to remember instructions from a skill or system prompt.
  • Build with an agent SDK, prompt very specifically: When using Claude Agent SDK or OpenAI's equivalent to generate the harness itself, models default to overly deterministic outputs and resist embedding AI logic. Counteract this by specifying the exact workflow steps, tool list, custom prompt locations, and artifact structure before generating — vague prompts produce scaffolding without agentic behavior.

Notable Moment

When building the harness using both Claude Code and Codex simultaneously, both models repeatedly resisted adding AI logic and kept producing fully deterministic code. Codex ultimately built the better harness — but implemented it using the Claude Agent SDK, spanning two competing AI ecosystems in a single project.

Know someone who'd find this useful?

You just read a 3-minute summary of a 21-minute episode.

Get How I AI summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

Books, tools, and gear mentioned in this episode

SignalCast may earn commission on purchases via these links.

Tools

  • VercelRecommended
    connecting it to Sentry, Vercel, Linear, and GitHub
  • 💼 SPONSORS ["Customer.io", "url": "https://customer.io/howiai"]
  • Claude Agent SDKRecommended

    by Anthropic

    Host Christina Cacioppo demystifies the term "harness" by building a live Sentry bug-triage harness using the Claude Agent SDK, connecting it to Sentry, Vercel, Linear, and GitHub
  • SentryRecommended
    building a live Sentry bug-triage harness using the Claude Agent SDK, connecting it to Sentry, Vercel, Linear, and GitHub
  • LinearRecommended
    connecting it to Sentry, Vercel, Linear, and GitHub
  • GitHubRecommended

    by GitHub

    connecting it to Sentry, Vercel, Linear, and GitHub
  • 💼 SPONSORS ["Bolt", "url": "https://bolt.new/howiai"]

More from How I AI

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

Explore Related Topics

This podcast is featured in Best AI Podcasts (2026) — ranked and reviewed with AI summaries.

Read this week's AI & Machine Learning Podcast Insights — cross-podcast analysis updated weekly.

You're clearly into How I AI.

Every Monday, we deliver AI summaries of the latest episodes from How I AI and 192+ other podcasts. Free for one show.

Start My Monday Digest

No credit card · Unsubscribe anytime