Koda Dojo
· Claude Code

Module 7: Agent Harnesses

Audit the tools, instructions, context and recovery paths around the model, then test whether a justified change improves actual task outcomes.

Lessons

  1. Same model, three harnesses. A short try-out of the bench, then a prediction: which of three launches writes no fix. Run all three, then repair the nightly launch.
  2. Read the failure backwards. Four failed runs on billing-api. Pin Claude's first wrong move in each transcript, set the dimension that failed it, and play it back.
  3. Redline the tool. A teammate's MCP tool, its error and its CLAUDE.md section. Flag the phrases that leave an agent guessing, then hand it over.
  4. One symptom, one knob. Four symptoms from billing-api. Set one harness knob for each, run it, and watch what that setting actually does.
  5. Pick the surface. Eight billing-api jobs. Put each on interactive claude, headless claude -p or the Agent SDK, run it, and see if it fits.
  6. Fresh check. A case you have not seen: an agent loop reaches its stop rule. Set the loop, then publish the report. Your first result is kept.

What you take away

  • Claude Code is the harness; when results disappoint, audit the scaffolding before blaming the model
  • Score your setup on action space, observation format, recovery contracts, and context budget: the fixes rank themselves
  • Audit clarifying questions for evidenced missing context; retain legitimate questions and avoid adding unnecessary instructions.
  • Wrap noisy commands in summary scripts: observation format is the cheapest reliability upgrade available
  • Inject failures on purpose: a recovery contract you have not tested is a wish

Field exercises

  • Score Your Harness on the Four Dimensions
  • Probe a Tool Definition in a Fresh Session
  • Write a Recovery Contract and Prove It With a Live Failure
  • Run the Same Task Through Two Harnesses and Measure the Gap
  • Shrink the Action Space With Permission Rules
  • Fix a Bad Observation Format With a Wrapper Script
  • Compare Recovery on a Disposable Failure Fixture
  • Audit the Context Budget and Reclaim Wasted Tokens

All fifteen modules of the Claude Code Dojo