Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if improving an AI agent’s performance had less to do with choosing a better model and more to do with the system built around it? In one experiment, LangChain improved its coding agent’s benchmark score from 52.8% to 66.5% without changing the underlying model. The difference came from harness engineering: the tools, context management, execution logic, and feedback mechanisms that turn an LLM into a reliable agent. In this episode, the focus is on why harness engineering is gaining attention, how it works, and why it changes the way agent performance should be evaluated. You’ll learn: * Why are better prompts no longer enough? Understanding the challenges of long-running agents, from context degradation and lost progress to unreliable tool use and verification. * What actually makes an agent harness? Exploring the components behind autonomous agents, the approaches used by OpenAI and Anthropic, and the emerging engineering patterns. * Can the same model deliver radically different results? Examining real benchmark experiments, the impact of harness design, and why leaderboard scores may reveal less about model capabilities than they appear to. 👉 Enjoyed this episode? Subscribe to The AI Practitioner to get future articles and podcasts delivered straight to your inbox: aipractitioner.substack.com Get full access to The AI Practitioner at aipractitioner.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
[music]
SPEAKER_00Welcome back to The AI Practitioner, I'm Lina Faik, ML Engineer, Consultant and Lecturer in Advanced Machine Learning at Sorbonne University. I help companies turn their data into real outcomes with AI, and this is where I share what I learn from actual projects. The deep technical write-ups live on Substack at AIPractitioner.substack.com, and these conversations are the audio companion. Today I'm joined by Sam, an engineer who has written plenty of prompts and built LLM features, but hasn't gone deep on agents that run for hundreds of steps.
SPEAKER_00Sam, welcome.
SPEAKER_01Thanks, Lina. Happy to be here. So what's on the table today?
SPEAKER_00Picture this. A coding agent gets a bug report on a large repository. It has to explore the code base, find the problem, edit files, and run tests. Some attempts fail, so it needs a new approach. And a hundred steps in, it has to remember a decision it made at step 10.
SPEAKER_01Ouch. That's a long day.
SPEAKER_00It is. And the question I want to dig into is simple. Who is managing all of that? Because a well-written prompt can guide the agent, but it can't run the tools, track progress, or decide when to stop. That surrounding system has a name, the agent harness, and it matters far more than most people expect.
SPEAKER_01Hold on. Isn't this just a better prompt? Add a few lines like test your code and remember your decisions and move on.
SPEAKER_00That's the natural instinct, and prompts do matter. A study by Sklar and colleagues changed only the formatting of few shot prompts. Same meaning and accuracy moved by up to 76 percentage points on LLMA 2-13B. For a single model call, improving the instructions is often the best lever, but a prompt can only ask. It can't enforce anything across a hundred steps.
SPEAKER_01Okay, so what actually goes wrong over a long task?
SPEAKER_00The article lists four failure modes. First, context gets harder to manage. A longer context window doesn't guarantee better performance. Chroma evaluated 18 models and found that reliability often dropped as the input grew, even on simple tasks. They call it context rot.
SPEAKER_01Great name. Terrible phenomenon.
SPEAKER_00Second, progress gets lost between sessions. In an anthropic experiment, Cloud Opus 4.5 struggled to build a web application across multiple context windows. Features were left unfinished, and the next session had to reconstruct what had happened. Even summaries didn't always carry enough.
SPEAKER_01So it's a shift handover with no notes.
SPEAKER_00Exactly that. Third, tool selection. Giving an agent more tools doesn't mean it uses them better. A study called Longfunk Eval found that tool calling performance dropped by anywhere from 7% to 85% as the number of tools grew. And fourth, agents don't always verify their work. Langchain saw agents write a fix, re-read their own code and stop without running a single test.
SPEAKER_01Honestly, that's me on a Friday evening.
SPEAKER_00Ha! Same. But here's the key point. None of these are really problems of poorly written instructions. They're problems of coordinating decisions, tools, and information over many steps. A prompt can encourage testing. The system around it can make testing happen.
SPEAKER_01Where does context engineering fit in? I keep hearing that term.
SPEAKER_00Think of it as three layers, each one keeping the one before it. Prompt engineering is how you communicate the task. Context engineering widens that to everything the model sees during execution. Instructions, tool definitions, conversation history, retrieved information. Techniques like just-in-time retrieval, compaction, and structured memory live there. Harness engineering widens it again to the whole execution process. Running tools, preserving progress, recovering from failures, verifying results.
SPEAKER_01So give me the definition. What is a harness in one line?
SPEAKER_00Agent equals model plus harness. The model generates decisions. The harness is the code, configuration, and execution logic that turns those decisions into actions.
SPEAKER_01Fine, but everything that isn't the model feels like a very loose definition.
SPEAKER_00It is loose, and the article says so. There's no universally accepted boundary. Some practitioners find this definition too broad and prefer a narrower one, centered on the controls and feedback added around an existing coding agent. But patterns are emerging. A 2026 source code study looked at 11 coding agents, including Cloud Code, Codex CLI, and Open Hands. It found seven core subsystems and 29 recurring design patterns.
SPEAKER_01Any surprises in there?
SPEAKER_00Two. None of those agents relied on a general-purpose agent framework, and none used vector embeddings for code retrieval. They favored custom execution loops and deterministic search.
SPEAKER_01Huh. That's not what I would have guessed.
SPEAKER_00Me neither. For a coding agent, the harness has five components. Context management, tools and environment, state management, orchestration, and verification and controls. I won't walk through each one on mic. The article has a diagram that shows how they loop around the model, and it's much clearer on a page than in audio.
SPEAKER_01Wait, how is a harness different from a framework or a runtime? I use those words interchangeably.
SPEAKER_00You're not alone. The article suggests three levels. Frameworks provide reusable abstractions, think LangChain, CrewAI, or the OpenAI Agents SDK. Runtimes manage execution, like LangGraph or Temporal, with state persistence and recovery. Harnesses integrate it all into an operational agent, like DeepAgents, the Cloud Agent SDK, or a coding agent, such as Codex, and they overlap. A harness can be built with a framework and run on a runtime.
SPEAKER_01And an evaluation harness?
SPEAKER_00Different thing and worth keeping straight. An agent harness manages how an agent does its work. An evaluation harness runs controlled trials. It provides the tasks, sets up the environments, records traces, and grades the outcomes.
SPEAKER_01Okay, show me this working in the real world.
SPEAKER_00Two case studies, and they're complementary. OpenAI described Codex agents building an internal product with roughly 1 million lines of code and 1,500 merged pull requests over 5 months, without engineers writing code by hand. Their harness trick is a short agents.nnd file, around 100 lines, that works as a map to detailed docs, instead of stuffing everything into context. Add custom linters and structural tests that enforce architecture, plus background agents that clean up Drift.
SPEAKER_01So the agent gets a table of contents, not the whole encyclopedia.
SPEAKER_00Love that. The Anthropic case is about state. They had Cloud Opus 4.5 build a web app with more than 200 features across many context windows. The fix was a first session that sets up the environment, then a progress log, git history, and a structured feature list that persist between sessions. Each session works on one unfinished feature, and the feature only counts as done after testing, including end-to-end checks through browser automation. The article lays out the full session structure step by step, so I'll leave it there.
SPEAKER_01So memory lives outside the conversation.
SPEAKER_00Right. Recovery doesn't depend on chat history. And there's even research on improving harnesses automatically. In one 2026 study, AI agents analyzed failures, modified things like tools and memory, and retested. After 10 iterations, success on Terminal Bench 2.0 went from 69.7% to 77.0%, with GPT 5.4 unchanged.
SPEAKER_01Now I want the headline number, the one from the intro of your article.
SPEAKER_00Longchain's coding agent went from 52.8% to 66.5% on Terminal Bench 2.0. Same model, GPT 5.2 codex. That moved it from outside the top 30 to the top 5. That's a 13.7 point jump from the harness alone.
SPEAKER_01What did they actually change?
SPEAKER_00Three things stand out. Self-verification. A checkpoint intercepts the agent before it finishes and reminds it to test against the original requirements. Context and time management. The agent gets the directory structure, tools and limits, plus reminders to start verifying before the budget runs out. And loop detection. If the agent keeps editing the same file, the harness nudges it to rethink.
SPEAKER_01Not a single change to the model.
SPEAKER_00Not one. One caveat though, they tuned the harness using traces from the same benchmark, so we can't conclude how well it generalizes to unseen tasks.
SPEAKER_01Good caveat. So are harnesses just a free lunch?
SPEAKER_00Not quite. Another paper compared nine harnesses all running cloud Opus 4.6 on Terminal Bench 2.0. Success rates ranged from 58.0% with cloud code to 79.8% with forge code. That's a 21.8 point gap.
SPEAKER_01Wait, I don't buy that as a clean comparison. Those harnesses probably had different budgets and reasoning settings too.
SPEAKER_00You're right, and the article says exactly that. The comparison doesn't isolate harness design from other configuration differences. And it gets worse for Forgecode. An independent audit found it loaded agents.mnd files containing benchmark answers, sometimes copying them instead of solving the tasks. For a separate leaderboard entry, auditors estimated the score would drop from 81.8% to around 71.7% without the leaked answers. So the leaderboard was partly an answer key.
SPEAKER_00Sometimes even unintentionally. Another harness exposed hidden grading tests, so the relevant unit of evaluation is the model and harness combination, not either one alone.
SPEAKER_01That feels like it changes how I read every leaderboard.
SPEAKER_00It should. Agent benchmarks involve many steps, tools and environments, so a score reflects more than the model. The article points to three factors. First, harness configuration. On CoreBench, GPT 5.4 scored 94.9% with Codex CLI and 51.3% with CoreAgent. Same model.
SPEAKER_01That's absurd.
SPEAKER_00Second, the execution environment. Anthropic changed resource limits only, same model, same harness and saw a six-point difference on TerminalBench 2.0. Third, evaluation methodology. Anthropic reported that Cloud Opus 4.5's CoreBench score rose from 42% to 95% after they fixed grading issues and changed scaffold constraints. Several things changed at once, so you can't say which one mattered most.
SPEAKER_01So what should a trustworthy evaluation actually report?
SPEAKER_00Four themes, the configuration model and harness versions, tools, reasoning settings, dataset resource limits, performance and efficiency, success rate, time, tokens, cost, reliability, repeated trials and uncertainty. And Passing the benchmark means the software is good? Not necessarily.
SPEAKER_00Passing predefined tests can miss maintainability and architectural quality. That gap is something the research increasingly highlights.
SPEAKER_01Let's make this practical. Say it's Monday morning and I'm building a coding agent. Where do I start?
SPEAKER_00The article's tuning order starts with verification. Langchain saw agents stop after a plausible solution without testing it. And adding a verification checkpoint addressed exactly that. Then keep context relevant and manageable with structured docs, external progress files, and just-in-time retrieval. Then read your execution traces instead of tweaking prompts blindly, and run ablations to see which components really help.
SPEAKER_01And after that?
SPEAKER_00Two more principles. Let the harness evolve with the model. Anthropic removed context resets that helped earlier models once opus 4.5 arrived, and simplified task decomposition with opus 4.6, and always balanced performance Where can people go deeper on all of this? The full write-up with the diagrams, the sources for every number I mentioned, and the reasoning behind each principle is at AIPractitioner.substack.com.
SPEAKER_00This is part one of two. The next article gets practical and shows how to implement an agent harness with code.
SPEAKER_01I'll be there for part two.
SPEAKER_00One last thought. The model is only one part of the system we're building and measuring. The teams getting real gains are the ones designing the environment around it, how it verifies, how it remembers, and how honestly we evaluate it. [music]
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could learn from every interaction...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could continuously improve their...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could improve their own prompts...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if the key to better AI agents isn’t writing...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. Standard RAG works well when the answer is contained...