Most teams prioritize model choice, yet LangChain’s Terminal‑Bench experiment showed that changing only the harness—same model throughout—moved a coding agent from roughly 30th place into the top 5. This shifts focus to the execution loop, treating the harness as an architectural decision. Paul Iusztin’s open‑source course introduces Decode, a Python agent that isolates the loop in a headless harness shared across modes.
The harness contains the core loop: the LLM picks an action, a tool runs, the observation returns, and all data stays in the context window. Decode’s agent definition is ~20 lines of Pydantic AI, composing a model, tools, and an output type; everything else—memory, skills, sandbox, permissions, LSP feedback, compaction—lives in the harness. Three run modes plug into this core: an in‑process terminal UI, a detached background worker, and a stateless API endpoint. Each mode has a distinct latency profile, steering it toward a specific inference provider (low‑latency local, balanced cloud, or high‑throughput batch). Input steering uses a queue and priority gate that buffer keystrokes and inject them only at safe boundaries (MODEL_REQUEST or WOULD_STOP), allowing Plain Enter to steer within a turn, Alt+Enter to queue a follow‑up, and Esc to abort cooperatively.
- Live UI: in‑process, async streaming, lowest latency.
- Background worker: detached, moderate latency, cloud‑suited.
- API endpoint: stateless, higher latency, batch‑oriented.
Why this matters
Harness design can outweigh model choice in agent performance, showing that loop safety, latency‑aware steering, and provider matching give gains than simply upgrading the LLM. This redirects focus to loop architecture and inference economics.
Share this article
Found this insightful? Share it with your community on Reddit, X, or copy the link.
