“It’s an LLM, a loop, and enough tokens.”
—Nicolay Gerold, Amp Code
So why does a coding agent forget your instructions, keep reading tiny pieces of a file, or struggle with an edit another model handles easily?
Nicolay Gerold (Amp) joins Hugo to take that loop apart and explain the harness around it: the software that executes tools, manages context, and lets you steer the agent’s work. Nico builds this machinery for Amp, a coding agent that works across software projects.
“Every component in a harness is basically an assumption the model can’t do it on its own. This expires over time.”
— Nicolay Gerold
Amp’s experimental plan mode addressed models that were too eager to edit. Once they could reliably follow an instruction to plan without editing, the team removed the separate mode. Nico describes a similar change with file reading: stronger models could search, filter, and read files through Bash, reducing the need for a dedicated read tool.
That gives builders two questions to ask when a model improves: which workarounds can you remove, and what more can you ask it to do? Nico describes pushing stronger models to delegate work and challenge what their sub-agents return. Better judgment makes that delegation more useful, while making some older controls unnecessary.
We start with a small agent in Go, then explore Pi, an extensible coding agent, and the decisions behind longer-running work. Building your own makes failures easier to investigate: you can see which instructions survive a summary and whether the agent can inspect the logs and tests it needs. Nico also recommends experimenting with cheaper models, whose mistakes can expose knowledge you’ve left in your head instead of giving to the agent. That understanding stays useful even if you ultimately use someone else’s harness.
You can also find the full episode on Spotify, Apple Podcasts, and YouTube.
👉 Want to build an agent yourself? Join Build AI Agents from First Principles on September 24, 6–10pm EDT (September 25, 8am–noon Sydney). We’ll start with a single model call and build a working customer-service agent, adding tools and context as we go. You’ll leave with code you can adapt to your own work. Friends of Vanishing Gradients get 10% off with the code NICO10 here.👈
“Usually you want to build features that the model is barely able to do right now, but through the increases in intelligence will be able to do easily in the future.”
— Nico Gerold
In This Episode
* Trace the core loop from a user message to a model’s tool request, the code that executes it, and the result fed into the next call.
* Saved sessions, streaming, steering, and cancellation: what Pi adds around the loop, including what should happen to running tools when you hit stop.
* Three sources of context, and how repository instructions, development-server logs, and filtered tool results help an agent do its job.
* Compaction that loses your instructions, handoff that carries work into a fresh conversation, and why better summaries changed which features Amp needed.
* Long plans nobody reads, growing token bills, and the difference between generating a plan and giving a human something useful to review.
* Bash versus a dedicated read tool: combining searches and file reads in one call, and the tradeoffs around binary files, restrictions, and line numbers.
* String replacement versus patches, and why a tool interface that feels familiar to a model can still lead it into the wrong call.
* Recursive language models: using code to inspect tool outputs, where Nico found delegation benefits, and where the context savings disappointed him.
* How Nico used agents to build extensions, learned from users’ failures, and turned those failures into evaluation cases… evals for agents!
Resources
* Nico’s workshop repository: the Go agent, topic explainers, and Pi and Amp extensions used throughout the workshop.
* The core-loop walkthrough: follow the conversation array, tool execution, and the runtime around them.
* Harness-engineering notes.
* Read tools versus Bash.
* How to Build an Agent, by Thorsten Ball: the tutorial Nico credits when explaining the core loop.
* How To Build a General Purpose AI Agent in 131 Lines of Python: my Python walkthrough, shared during the workshop.
* Pi and its documentation and source: the extensible coding agent we explore alongside Nico’s Go implementation.
* Pi: The Minimal Agent Within OpenClaw, by Armin Ronacher.
* How I Built Handoff in Amp, by Nicolay Gerold: the feature he built when compaction kept losing his instructions.
* Context Rot: How Increasing Input Tokens Impacts LLM Performance, from Chroma.
* The Coding Agent Is Dead: the Amp article we discuss when considering what agents can take on beyond code edits.
Related
* What Claude Fable Means for Coding Agents: my previous podcast with Nico.
* Teleporting into the Future and Robbing Yourself of Retirement Projects, by Geoffrey Huntley, shared during the workshop.
* How to Build an Effective Agent Harness: choose the machinery around the job your agent needs to do.
* How Evals Are Central to Harness Engineering: use observed failures to decide what to change and check whether it helped.
* Build Better AI Agents: Architecture, Harnesses, and Evals: two free lessons on September 17 and 21, with recordings available afterward.
👉 Want to build an agent yourself? Join Build AI Agents from First Principles on September 24, 6–10pm EDT (September 25, 8am–noon Sydney). We’ll start with a single model call and build a working customer-service agent, adding tools and context as we go. You’ll leave with code you can adapt to your own work. Friends of Vanishing Gradients get 10% off with the code NICO10 here.👈
How You Can Support Vanishing Gradients
Vanishing Gradients is an independent podcast, workshop series, blog, and newsletter about what people are building with AI and what survives contact with real users.
* Become a paid subscriber.
* Share this episode with a friend or colleague who’s building with agents.
* Subscribe to the Vanishing Gradients YouTube channel.
* Read and subscribe to the Vanishing Gradients newsletter.
* Join our livestreams and free workshops on Luma.
* Browse upcoming workshops.
Get full access to Vanishing Gradients at
hugobowne.substack.com/subscribe