All stories
Harness Engineering 101 Ecosystem Community reports

Build an AI agent in 300 lines? Harness Engineering 101 gets a v1.1 refresh

The 16-chapter community guide adds a real MCP caching example and an AI usage disclosure as readers debate its presentation on Hacker News.

Sources (5)

Why now October 19 commits bump the existing book to v1.1 and add firsthand examples and a disclosure; an English Hacker News thread submitted that day supplies fresh discussion.

Harness Engineering 101 turns the machinery behind a coding agent into a roughly 300-line Python teaching project. Its October 19 v1.1 refresh gives builders a concrete reason to revisit the existing 16-chapter guide: firsthand examples of what breaks around the model, plus a clearer account of how the book was written.

Isuru Wijesiri’s central framing is that the harness maintains the conversation, executes tools and controls the model’s actions. Readers move from a basic API loop to caching, context management, subagents, MCP, skills and guardrails. The accompanying One Code project is a separate coding agent built on pi; this book is not an extension that installs into pi, Codex or OpenCode.

Start with the cache failure

The strongest entry point is chapter five. In an example added to v1.1, Wijesiri says toggling MCP servers in WSO2 BI Copilot changed the tool array and caused the next request to miss the prompt cache. That makes an abstract infrastructure concern tangible: changing the tools sent near the front of a request can invalidate reusable context even when the agent still appears to work.

For a practical reading session, follow that chapter into the annotated final harness and its cache-observation exercise. Running the toy requires Python and an ANTHROPIC_API_KEY; API calls can incur charges. The author explicitly leaves out retries, streaming and compaction and describes its permission gate as a rough sketch. It executes commands, so the small code size should not be mistaken for a production sandbox.

A revision with a live argument attached

The October 19 Hacker News thread includes recommendations to build a small harness, criticism of the book’s metaphors and prose, and replies from the author. The thread was flagged when reviewed; that is a moderation state, not proof of how the text was produced.

The pinned README says Wijesiri drafted every chapter from his own experience and used Claude Code and One Code to reorder and polish text, generate diagrams and write chart code. Those are his disclosures. The prose uses CC BY-NC-ND 4.0, while the Python code is MIT-licensed. Today’s news is the revision and renewed discussion of an existing learning resource, not a newly released production agent.