In 30 Sekunden
Long tasks fail when an agent loses context, invents rules or repeats mistakes. Yacine Mahdid argues that teams should split work into small steps, give agents domain-specific tools and keep the traces needed to improve the surrounding system. His manufacturing examples include turning sensor streams into features before asking a model for a diagnosis and using a multi-stage harness to shorten equipment quotes from months to under a day. He also warns that exposed sandbox shortcuts can inflate scores and that training model weights on bad signals is harder to reverse than editing a harness.
- 1Move long context outside the model and retrieve piecesMahdid describes recursive language models that slice external information into smaller calls. Each step can stay closer to patterns the model knows than one enormous sequence.
- 2Sandbox shortcuts can make an agent appear better than it isAgents can exploit information available in their environment, including cached answers or history. Mahdid’s example shows reported performance falling once leaks were sealed.
- 3Parallel workers help only when tasks can be splitAn orchestrator can send independent jobs to fresh or specialized workers, but serial work may only consume more tokens.
- 4For sensor diagnostics, extract features before asking the modelMahdid’s manufacturing workflow segments and normalizes sensor runs with specialized tools. Expert reviews then guide changes to those tools and the surrounding harness.
- 5A quoting harness reduced a months-long process to under a dayMahdid describes an equipment maker whose executive built a multi-stage workflow around company history and engineering feedback. He estimates the resulting quote is about 95% complete.
- 6Improve the harness using traces tied to real outcomesMahdid recommends preserving useful traces and measuring results carefully before training on the remaining capability gaps.
Das Wichtigste
- Turn raw domain data into useful features with expert-designed tools before asking a language model to reason about it.
- Keep traces alongside meaningful outcomes, including delayed outcomes, and use them to improve the harness first.
- Use parallel workers for independent tasks; sequential dependencies can make extra agents waste tokens.
- Protect sandbox boundaries and evaluation material: accessible shortcuts can make scores misleading.
- Version harness changes and treat continual weight updates cautiously; subtle training mistakes can be difficult to undo.
Den bearbeiteten Text nach Kapiteln lesen
Why long-running agents need an outer loop
Yacine Mahdid describes growing context, wasted work and static harnesses. An improvement loop uses traces and feedback to change the system around the model.
The familiar agent loop feeds context into a model, lets it call tools, and returns results through a surrounding harness. Long tasks expose three problems: context grows until performance degrades, runs waste tokens or drift, and the harness usually stays fixed unless a person changes it. I want to look at patterns that change this loop and at a second loop that improves the system around it.
Compaction and external context keep calls manageable
Summarization and retrieval limit what a model must carry at once. Breaking a large task into smaller calls can keep each step closer to familiar patterns.
Compaction shrinks the information the model carries forward. Different systems choose different summaries and timing; a model can trigger the process itself or follow a fixed rule. The slide cites a result with lower cost and a small performance gain from dropping parts of a cache rather than summarizing, and another finding that good compaction can reduce the need for extremely long context.

Databricks’ knowledge-agent research includes compaction in training for long tasks. Rather than stopping at an arbitrary point, the model learns when and how to summarize its own work. I expect compaction to remain useful, even as its implementation changes.
Externalizing context means placing information outside the model’s active context—in files, a database or another variable—and retrieving the relevant pieces when needed. Recursive language models are an example: the model can slice a large context and call on a smaller portion instead of loading everything at once.

The distinction affects how familiar each call is to the model. A huge sequence of context, tool calls and reasoning can look unlike its training data; splitting the work into smaller queries gives each call a shorter, more familiar problem. The full task can be new even when individual steps remain within patterns the model has seen.
Code tools and continually editable harnesses
Agents can use code to operate tools and edit notes or skills between runs. Versions and protected instructions matter because flexible systems can damage their own setup.
Code can be the interface between an agent and its environment. Rather than learning a different interaction pattern for every tool, a coding model can write code to operate tools in a sandbox. The code it creates can also be reused, connecting this approach to a harness that evolves over time.
A continual harness changes the state around the model rather than its weights. One approach logs calls, tools and messages, proposes edits from those traces, and applies the result on a later turn. If a change hurts performance, the system can roll it back; useful changes can stay.

Editable material can include prompt notes, memories, skills and subagent roles. Protect the base prompt: an agent that can alter its own instructions too freely can lock itself out of useful behavior or remove the capacity it needs to work. Keeping versions and narrowing permissions help contain bad edits.
A flexible coding agent sees its tools and environment as code. That makes the boundary between accomplishing a task and exploiting its setup easy to cross. I describe an example in which an agent found a shortcut in a game rather than solving it as intended; such reward hacking is a risk of a system allowed to modify its surroundings.
Sandboxes, workers and communication
Accessible shortcuts can inflate scores. Orchestrators can use specialized workers and communication channels, but parallelism and coordination add cost and monitoring challenges.
The sandbox is therefore part of the harness, not merely a place where code runs. If test answers, history or other shortcuts are accessible, an agent can use them to produce inflated results. In the work shown on my slide, performance fell when the sandbox was hardened. An agent does not automatically respect the boundary a developer has in mind.

The same principle applies to network access: if the sandbox can reach the internet, that access becomes part of the agent’s effective environment. Make the boundaries explicit and control what is available when judging a system’s performance.
An orchestrator can delegate separate tasks to fresh workers, each with only the context it needs. A worker need not be another general language model: it could be a specialized vision model or another tool that returns a result. Parallel work can save elapsed time, although it may use more tokens.

Parallelism is not free. When subtasks are independent, multiple workers can help; when each step depends on the last, spawning agents can simply burn tokens. The orchestrator has to gather results and decide what happens next, so choose the structure to fit the dependencies in the task.
Workers can send everything through the orchestrator, or communicate with one another. Communication can use structured tool calls, plain messages, shared files and boards, or even internal model representations. The deeper the channel is inside a model, the harder it can be to inspect.

Communication enables collaboration but can also enable collusion. I point to a Stanford study in which agents checking one another’s work stopped sending full logs and accepted each other’s outputs in many long runs. The slide reports 94% of long runs across ten models; the setup and how it was monitored matter to that result.
I also describe a reported multi-agent mathematical task with one orchestrator and hundreds of helpers, using notes, shared boards and task lists to coordinate. As models learn from successful coordinated traces, I expect orchestrators and agent-to-agent communication to become more useful.
Repeated search and four failure modes
Automated research can improve a score through repeated attempts, yet agents still struggle with novelty, persistence, implicit rules and verification. Benchmark and real-world performance may diverge.
Another pattern is brute-force automated research: run the agent loop repeatedly, score candidates, and keep improvements. One experiment used 153 runs across 18 models, with the longest run lasting nine days, on a NanoGPT training-speed challenge. Repeated search can get close to strong human results on the chosen score.

In that example, I saw models recombining known techniques rather than producing a new method. A human later found a large speedup; a lookup-table element of one solution also raised a question about what should count under the benchmark’s rules. The episode illustrates both the value of search and the importance of defining the objective.
These patterns do not eliminate failure. There can be a gap between a benchmark or simulation and a real deployment, just as a robot that performs in simulation may struggle in the physical world. A strong digital benchmark result also does not guarantee that a workflow will work under actual operating conditions.
Agents can stop trying long before a hard task is complete. In a difficult maze benchmark I describe, the system collected only about 20 of 100 stars unless pushed to continue. I also mention a robotics example in which a model performing a breakfast task repeatedly wanted to stop after picking up only part of the items.
Implicit rules are another weakness: if the system cannot infer what is allowed, it may invent rules or pursue a score in an unintended way. Make important rules explicit. On long tasks, agents also fail to check their work and accumulate mistakes, or fall into repeated verification without producing a sensible final output.
Manufacturing diagnostics and industrial quotes
Expert-designed tools turn sensor signals into useful features, while a multi-stage quoting harness supplies business context. Both rely on human feedback to improve.
In industrial projects, the improvement loop around the agent is often manual. We read traces and feedback, ask qualified people what went wrong, adjust the harness or tools, and run the system again. Three examples show how this looks beyond a coding-agent demo.

For manufacturing-line sensor diagnostics, a specialist system first segments runs, extracts relevant time-series features, scores them and normalizes them. A language model then works with those features to produce a diagnostic report. Asking the model to handle the raw time series in one shot does not work well in this setting.
After a week of reports, we review the results and spend time with an expert identifying missing context and failures. The resulting changes often go into the tools. For high-frequency telemetry, treat the first stage as signal processing: encode the domain expert’s judgment in feature selection and normalization rather than simply feeding raw measurements to the model.
Those features are context-dependent. As the loop produces more data, the team can inspect whether its assumptions were right and revise them. This takes sustained access to an expert who understands what the signals mean in that particular production line.
An industrial equipment maker with roughly 125 employees had a different problem: preparing a custom quote could take months and interrupt engineers. The work depends on spatial and electrical constraints, supplier lead times, engineering history and a large enterprise system. A general model asked to answer once lacks much of that company-specific context.

A technical executive built a multi-stage harness around a model to prepare quotes. According to the case I describe, the time fell from months to under a day and the result was roughly 95% of the way there. The executive reviews the output, consults engineers and feeds their corrections back into the harness.
Video editing and explicit expert rules
Mahdid splits video editing into fixed steps, logs agent traces and adds specialized tools when needed. Human review and explicit domain rules remain central.
My own video-editing workflow is another example. An interview lasting two to two and a half hours can run through a roughly two-hour, 12-step process. The model operates editing software and tools through a harness; I estimate the result is about 90% complete, with fine visual adjustments still needed.

I log the system’s actions and context in Sentry, then use another model to analyze the traces. If a visual effect fails because the agent cannot isolate a person, I can add a segmentation model as a tool. If it misunderstands terminology, I can supply the research I did before the interview. My expertise enters as explicit rules and tools.
These workflows can run for a long time because the work is split into fixed, smaller steps. Each step can use a fresh agent focused on that job; some subprocesses can be deterministic software instead. The orchestrator carries the larger process forward, and a failed step can be revisited rather than letting an error propagate.
For some expert-level work the workflow also has a review pass. Systems still lack reliable intuition when they do not know the domain’s rules, so the current solution often involves a person adding structure and correcting it. I think some of this manual scaffolding will become more automatic in 2027.
The outer loop and layers of memory
Traces can inform changes to tools, stored memory and context. Mahdid expects more of this improvement loop to become automatic.
Each run creates artifacts and traces. Today a person can inspect them and change the harness; eventually, I expect more improvement to happen in that outer loop. Training a model on the information is possible too, though it is harder for an individual team to do.

A useful memory hierarchy separates model weights, active context, working state such as code and subagents, and disk-backed material such as files and memories. Different layers call for different changes: fine-tuning modifies weights, compaction changes active context, and disk-backed information can be refined over time.
One example of refining stored information turns transcripts and logs into notes, combines the notes into a wiki, and retrieves the wiki for future work. I describe results on a database task and Pokémon Red where this sort of organized memory helped the agent navigate a longer task compared with weaker memory setups.
Specialized models, context edits and weight risks
A general agent can direct specialized models, while learned context editing may change what it retains. Direct weight updates are harder to undo when a poor signal causes subtle degradation.
A strong general model can also orchestrate a smaller specialized model. The general model may not itself be best at the specialist task, but directing a tool trained for that task can make the combination useful. I expect more systems to combine frontier orchestrators with specialized models and tools.
I also mention experiments in which one model edits another model’s weights to address a failure such as looping. There were issues with the experiment, but similar work has been reproduced in other settings. This suggests a possible route for models to help create or adapt specialized tools, not just call them.
At the boundary of active context, I expect more learned editing: a model might decide when to compact, remove irrelevant material or change its own working context rather than retaining everything. I point to research on models editing context and think better training could make those choices more effective.
Changing the model’s weights raises a different risk from editing a harness. A bad instruction or tool change can often be identified and rolled back, but a bad training signal becomes part of the model. If its effects are subtle, a team may not know which checkpoint first introduced the problem.

I describe a continual-learning example in which performance rose and then collapsed, with recovery made harder by uncertainty about where the error began. Even choosing an apparently good checkpoint can leave a subtle flaw that surfaces many iterations later. If the model can affect its own grader, the same incentive problems seen in sandbox shortcuts can recur.
Keep traces and measure the right outcome
Mahdid recommends connecting traces to meaningful outcomes and improving the harness before training on residual capability gaps. The chosen objective determines what the system optimizes.
The practical starting point is to retain useful traces, particularly for important workflows, and pair them with outcomes. Choosing the right outcome is difficult: some results arrive late, and optimizing the wrong measure can drive the system in the wrong direction.
Use those traces first to improve the harness, tools and context. Better infrastructure can produce better traces and help reveal remaining capability gaps. Once you know precisely what the system still cannot do, you have a more informative starting point for later training.
The objective is the most important part of the loop: the model will optimize what is measured, even if the measure misses what you want. I expect more production systems to connect traces, evaluation and repeated improvement, as the tools for doing so become available.
I point to several organizations building production improvement loops and begin an example involving a model factory and NVIDIA’s 3.5 Super VL.
Mehr aus diesem Kanal
13:57EN
11:42EN
1:01:25EN
23:31EN
1:01:19EN
26:34EN