mini-harness: a teaching agent harness in ~1,300 lines of Python with skills, MCP and compaction
PawelHuryn · x · 2026-11-06
Pawel Huryn open-sourced mini-harness (MIT, 1,300-1,400 lines of Python, two dependencies, readable in one sitting) — a fully working agent harness built for teaching:
- Tool loop, 5 local tools plus web search, resumable sessions
- Goal mode, permissions, Agent Skills, MCP servers
- Implements Anthropic's server-side compaction
- Runs on Claude and other models speaking Anthropic's message format
Motivation: existing minimal harnesses lack goal mode, permissions, skills and MCP — he wanted a complete runnable implementation to explain exactly how a harness is built. Great source-reading material for developers who want to understand agent harness internals.
More from coding & agent
- Making games with PlayAstrocade: AI copies recipes well but can't innovate — andrey_kurenkov · 2026-11-07
- gemini-cli PR fixes orphan /dev/ptmx master FD leak on macOS PTY spawn — ugorla-dev · 2026-11-07
- Harness launches live LoRA RL training on LFM2.5, LFM3 and Twil-9B for agent tasks — omarsar0 · 2026-11-07
- Deleting 7,500 lines of CI workflow code cut costs 40% and sped up runs 15% — DanielLockyer · 2026-11-07
- A PE Board Seat's View: The 8-Stage Cycle of Replacing Engineers With AI Agents — alex_verem · 2026-11-07
- Meta researcher: model never tuned for Codex, will improve harness randomization — JoshPurtell · 2026-11-07