More How I AI episodes

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

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

Published 8 Jul 2026

Duration: 00:24:35

"Harnesses are structured frameworks that enhance AI agent effectiveness by integrating tailored tools, workflows, and constraints for specific tasks like debugging or support, improving efficiency and control over outcomes."

Episode Description

Everybody is saying, Its not the model, its the harness, but almost nobody stops to explain what a harness actually is. So I did. I built one live on...

Overview

A harness is a structured framework built around an AI agent to enhance its effectiveness for specific tasks by incorporating both AI and non-AI components. It is designed with a clear context, defined actions, and desired outcomes, making it ideal for repetitive, structured workflows that combine deterministic and non-deterministic steps. Harnesses are particularly useful in technical domains such as debugging, handling production incidents, managing pull requests, and running system migrations, as well as in non-technical areas like research and documentation consolidation.

The key advantage of a custom harness over general-purpose AI tools lies in its ability to enforce consistency, control, and repeatability. Features like intent recognition, tool restrictions (e.g., read-only investigation modes), automated documentation, and multi-model routing allow for precise management of AI behavior. For example, a debugging harness can integrate with platforms like Sentry, GitHub, and Linear to automatically triage bugs, generate reports, and recommend next steps without making direct code changes. These systems can be implemented via terminal interfaces, command-line tools, or web applications, using frameworks like the Claude Agent SDK, and generate artifacts that serve as a reliable record of each execution, enabling scalable, tailored, and efficient human-AI collaboration in complex workflows.

What If

  • What if you built a debugging harness for your most frequent production issues?

    • Move: Identify the top 3 recurring bug patterns in your Sentry or error tracking tool, then create a CLI-based harness that connects to Sentry, fetches error context, runs diagnostic checks (e.g., log queries, release diffs), and outputs a structured investigation report with a recommended Linear issue draft.
    • Why Now?: You're already manually triaging similar bugs weekly - automating this now saves 2 - 4 hours/week and reduces cognitive load during on-call cycles, especially as your app scales and errors increase in volume.
    • Expected Upside: Achieve 80% faster triage, automatic documentation of root cause hypotheses, and consistent handoff to your task tracker - freeing you to focus on fixes instead of setup.
  • What if you automated your PR prep workflow using a custom harness?

    • Move: Build a lightweight TUI harness that, when given a Git branch, automatically pulls code changes, generates conventional commit messages, creates a draft PR summary with changelog snippets, checks for breaking changes via diff analysis, and validates deployment readiness using Vercel or Netlify APIs.
    • Why Now?: You're already spending 30 - 60 minutes per release on repetitive formatting, messaging, and checks - this is a high-leverage, deterministic workflow ideal for automation while you're still solo and can shape the process.
    • Expected Upside: Cut PR preparation time by 70%, ensure consistent release quality, and create reusable artifacts (e.g., release notes drafts) that accelerate future audits or customer comms.
  • What if you created a research harness to structure your competitive and technical investigations?

    • Move: Design a CLI harness that takes a research query (e.g., "compare edge runtime limits across Vercel, Cloudflare, Deno"), uses headless browsing or API calls to gather data, summarizes findings in a standardized Markdown template, and archives results in a local knowledge base with timestamps and sources.
    • Why Now?: You regularly research tools, competitors, or APIs for decisions - currently storing notes in scattered docs or chats; capturing this in a reproducible way now prevents rework and builds institutional knowledge before scaling.
    • Expected Upside: Reduce research cycles from hours to minutes, ensure decision traces are preserved, and enable quick updates by re-running the same harness when new data emerges.

Takeaway

  • Identify a repetitive technical workflow (e.g., debugging Sentry issues) and define its exact steps, inputs, and desired outputs to create a focused AI harness.
  • Build lightweight adapters to connect your AI agent with core tools (e.g., Sentry, GitHub, Linear) using their APIs, enabling automated data retrieval and task creation.
  • Implement mode-based execution (e.g., investigation vs. fix mode) with clear flags that restrict or allow actions like file edits or customer notifications to control AI behavior safely.
  • Design a simple interface (CLI or TUI) that displays run history, logs, and artifacts, allowing quick navigation and triggering of harness workflows with minimal input.
  • Store all AI-generated outputs (logs, reports, hypotheses) in a structured artifact store to serve as a searchable source of truth for debugging, auditing, and improving future runs.

Recent Episodes of How I AI

6 Jul 2026 How I run autonomous coding agents from my phone with OpenAI Symphony + Linear | Alessio Fanelli (Kernel Labs)

AI automates small business tasks like inventory tracking and order management via tools such as "magic glasses," explores personal AI use cases (e.g., Codex for hobby tasks), delves into autonomous agent orchestration with cloud-based workflows and GitHub, addresses challenges like scalability and model behavior, and reflects on AIs potential to bridge physical-digital systems, reduce manual effort, and enhance productivity while highlighting underutilized automation opportunities.

30 Jun 2026 Sonnet 5 review: I ran 64 generations to find out if it's worth it

Anthropic's Claude Sonnet 5 offers Opus-level performance at reduced costs with enhanced agentic capabilities, while a new benchmarking framework evaluates its competitive edge against models like Gemini 3 Pro and GPT 5.5, highlighting the need for standardized, human-informed evaluations to balance objective metrics and subjective quality.

24 Jun 2026 GLM 5.2: why Im replacing Opus in Claude Code with this new model

GLM 5.2, an open-weight model from Z.ai, offers a 1 million-token context window, strong performance on coding and reasoning tasks, cost-effectiveness, and local deployment flexibility, though it lacks image support and struggles with modern frontend frameworks.

22 Jun 2026 How Claude Mythos found a 15-year-old bug in Mozilla Firefox | Brian Grinstead

Recommended: AI finds bugs

Firefox employs AI agents as "coding archaeologists" to detect and address security vulnerabilities in its massive codebase, leveraging models like Mythos and custom validation tools to identify and systematically fix nearly 500 bugs, while balancing automation with human oversight and open-source collaboration to enhance scalability and security.

More How I AI episodes