TL;DR
Paul Iusztin and Decoding AI released a free, Apache-2.0 course and codebase that builds a Claude Code-style coding agent, called decode, in Python. Its thesis: the agent loop is about 20 lines; the engineering is the harness around it. Eight articles and six videos walk through that harness, from the loop to sandboxing, context engineering, subagents, remote headless runs, evals and record-and-replay.
Worth using as a teaching scaffold: one headless core, two front ends (terminal UI and remote serverless), and an evals layer, each lesson mapped to a module and a test milestone.
Built on Pydantic AI, with Modal (sandboxes, self-served open models, remote runs), Opik (tracing, evals) and Kitaru (recording, replay) as sponsors whose tools are baked in.
Estimated 4 to 8 hours; runs at $0 on free tiers.
Architecture
The course builds one headless harness and attaches two interfaces to it.
Core loop. A Pydantic AI ReAct loop over nine tools (read, edit, bash, grep and others) with three swappable providers: Gemini, OpenRouter, or an open model the learner serves on Modal via SGLang. Tool calls can pause for approval as deferred requests.
Harness modules. Memory, skills (a skills standard with
/commands), sandbox (local Docker or remote Modal), permissions, an LSP server for diagnostics, and a context window that auto-compacts at about 80% of capacity rather than at the limit.Interfaces. An interactive TUI with a steering queue and priority gate, and a remote mode running N headless copies on Modal, fired by CLI, webhook or cron, that ship branches.
Subagents. Parallel Explore subagents with scoped context windows, plus switchable build, plan and code-reviewer personas; lesson 5 frames subagents as context engineering.
Evals and replay. A 19-task benchmark and a regression suite in Opik; every run recorded in Kitaru, failures clustered into cohorts and replayed (optionally with a different model) to verify fixes.
The repo carries ADRs for each design choice, a glossary with one name per concept, and unit and integration tests that mirror the source tree, with capstone tests per milestone.
Lessons
| # | Lesson | What you build |
|---|---|---|
| 1 | Building a coding agent from scratch | The full harness sketch: headless core, six modules, two modes, evals |
| 2 | The bare-bones agent loop | Nine tools, three providers, a steerable TUI |
| 3 | From a raw shell to a sandbox | Tools run in Docker or Modal, never on the host |
| 4 | Context engineering | Memory, skills, LSP diagnostics, compaction at 80% |
| 5 | Subagents are context engineering | Parallel Explore subagents; build, plan and reviewer personas |
| 6 | Swarm of remote agents | Headless runs on Modal from CLI, webhook or cron |
| 7 | Agent evals 101 | A 19-task benchmark and a regression suite |
| 8 | Failures into a regression suite | Recorded runs, failure cohorts, replay to verify fixes |
Tradeoffs and failure modes
The structure is strong; the claims around it are the sponsor's and the author's.
Vendor coupling. Sandboxing, remote runs, evals and replay are taught on Modal, Opik and Kitaru, the three sponsors. The ideas transfer, but a learner leaves with those integrations, not neutral interfaces.
Provenance. The README says the design drew on Claude Code's leaked source alongside OpenCode, Pi and Aider. Teams with IP policies should note that before adopting code or patterns wholesale.
Headline evidence is borrowed. The "harness beats model" framing leans on LangChain's Terminal-Bench result (same model, harness change, about 30th to top 5), not on the course's own measurements.
Small eval. A 19-task benchmark teaches the method but cannot rank harness changes with confidence; the course pairs it with regression cases, which is the right instinct.
Remote swarm safety. Branch-shipping headless agents fired by webhook or cron need the permissions and sandbox lessons applied strictly; the README describes capability, not the guardrails' limits.
Implications
For anyone teaching agent engineering, this is a ready-made syllabus whose order matches how production harnesses are built: loop, then isolation, then context, then scale, then evals.
Checklist before adopting it in a course or team:
Swap or abstract the sponsor services where your stack differs (sandbox, tracing, replay)
Review the permission gate and sandbox defaults before enabling remote webhook or cron runs
Extend the 19-task benchmark with tasks from your own codebase before comparing harness changes
Keep the ADRs and glossary pattern; it is the part most teams skip
Check licensing and provenance of any pattern traced to leaked source
Related entries
R006 6 must-know terms for AI agent harnesses: the same author's vocabulary post; this course is its build-it-yourself version.
R022 Six-stage AI engineering reading list: a reading path through the same stages (context, harness, evals, observability); this is the hands-on path.
R005 Second Brain OS: another free course, mapping agents in five layers; this one teaches by building.
R020 The model proposes, the harness enforces: the course's regression and replay lessons are the harness side of that argument.
Sources
Building a Coding Agent From Scratch, Decoding AI, GitHub README
LinkedIn post, Paul Iusztin, 2026-11-10
Lesson 1 article, Decoding AI