FULL STORY
Mini-Harness: 1,300 Lines of Python from Open Source to Terminal Bench
Pawel Huryn open-sourced a ~1,300-line teaching-grade agent harness, then published its Terminal Bench 2.1 results across all 89 tasks, showing a minimal design can still run a full agent workflow.
2026-11-05 ~ 2026-11-06 · 2 episodes · 7 posts
Episode 1 · Developer Open-Sources ~1,300-Line Teaching-Grade Mini Agent Harness in Python (2026-11-05, 5 posts)
Pawel Huryn has released and open-sourced mini-harness: a complete agent harness in roughly 1,300–1,400 lines of Python with only two dependencies, MIT-licensed and designed for teaching, with the code kept short enough to read in one sitting. The author claims it outperforms the official reference implementation on Terminal-Bench, making it a low-cost entry point for anyone wanting to understand how an agent's core machinery actually works.
Confirmed
- The project is MIT-licensed open source, about 1,200–1,400 lines of Python (figures across posts range from 1,200 to 1,300–1,400 lines, reflecting iterative updates), with only two dependencies and a GitHub repo available
- Feature coverage: tool loop, 5 local tools + web tools, goal mode, permission and auto modes, Agent Skills, MCP, context compaction, memory, permission gates, and sub-agents, among others
- The author notes this is a feature set that most mainstream minimalist harnesses typically lack
- An accompanying newsletter series walks through it step by step: step 1 illustrates the reasoning loop with diagrams — a single model call is just one question and one answer, while fixing a bug takes multiple steps (reading files, editing code, running tests, reading errors, retrying); the harness sends the conversation to the model, executes the actions it requests, and sends the results back, with the model reasoning each turn based on what it sees; later steps guide readers to build a working agent, which can be cross-checked against the repo in reverse
Why it matters
- It distills "what an agent harness actually does" into an afternoon's worth of readable code, serving as a teaching artifact for understanding reasoning loops, permissions, compaction, sub-agents, and other mechanisms
- The author emphasizes that its Terminal-Bench performance beats the official one, showing that a minimalist implementation doesn't have to trade capability for simplicity
- Dev builds 1,200-line Mini Harness that beats Claude Code on Terminal-Bench — PawelHuryn · 2026-11-05
- The agent reasoning loop explained: how a harness turns one Q&A into many steps — PawelHuryn · 2026-11-05
- Build your own AI agent harness: memory, permission gates, and subagents — PawelHuryn · 2026-11-05
- mini-harness: a ~1,200-line teaching agent harness with MCP, skills and compaction — PawelHuryn · 2026-11-05
- mini-harness: a teaching agent harness in ~1,300 lines of Python with skills, MCP and compaction — PawelHuryn · 2026-11-06
Episode 2 · 1400-line Python teaching harness scores full marks on Terminal Bench 2.1 (2026-11-06, 2 posts)
Paweł Huryn released first Terminal Bench 2.1 results covering all 89 tasks with 3 iterations. His 1400-line open-source teaching agent harness, mini-harness, achieved a full score, after an earlier 1300-line version had landed mid-tier.
- First Terminal Bench 2.1 results: ~1,300-line Mini Harness lands mid-pack but fastest — PawelHuryn · 2026-11-06
- 1,400-line teaching agent harness scores full marks on Terminal Bench 2.1 — PawelHuryn · 2026-11-06