Sujan Bhuiyan
The Playbook 17 Jul 2026 11 min read

Loop engineering

Agent capability has doubled roughly every seven months for six years. Reliability has not kept pace. The discipline that closes the gap is not prompting — it is the loop you build around the model.

OBSERVE REASON ACT VERIFY WORKING CONTEXT TURNS 1…n FOLD COMPRESSED STATE THE HARNESS IS THE PART YOU WRITE
Fig. 00 — The loop, and the fold that keeps it running Loop engineering

There is a gap between what an agent can do once and what it can do dependably, and almost every disappointing AI deployment I have seen lives inside that gap. The model is not the problem. The demo worked. What failed was the loop around the model — how many turns it could run before it lost the thread, what it did when a tool returned garbage, whether anything checked the output before it reached a customer.

I have come to think of that loop as the actual engineering surface. Not the prompt. Not the model choice. The loop: what goes into context, what comes back out, what gets verified, and what happens on failure. This is the work.

The metric that made the gap legible

For a long time the industry had no honest way to describe agent progress. Benchmark scores went up while day-to-day usefulness stayed stubbornly patchy, and nobody could say why. METR's time-horizon work resolved that contradiction with a single reframe: measure capability in units of human time — the length of task, as timed on human professionals, that a model completes at a given success rate.1

The resulting picture is stark. Frontier models succeed at close to 100% on tasks that take a skilled human under about four minutes, and under 10% on tasks that take more than about four hours.2 Human task duration turns out to be strongly predictive of whether a model will succeed at all1 — which is another way of saying the binding constraint is not knowledge or skill at any single step. It is holding a long sequence together.

Success rate collapses with task length Fig. 01
100% 50% 10% 1 min 4 min 15 min 1 hr 4 hr 16 hr ~100% AT 4 MIN <10% BEYOND 4 HR
Curve is schematic; the two marked anchors are the published figures. The cliff, not the ceiling, is what breaks deployments — a system that is superb for four minutes and useless for four hours needs a loop that turns long work into short work.2

Reliability is a different curve entirely

The headline doubling figure — task length at 50% reliability doubling about every seven months1 — is the number everyone quotes. It is also the number most likely to mislead an operator, because 50% is not a shipping threshold. Nobody deploys a workflow that fails half the time.

Raise the bar and the horizon shrinks hard. For Claude 3.7 Sonnet, METR reported a 50% horizon of 59 minutes against an 80% horizon of roughly 15 minutes — the 80% horizon lands near a quarter of the 50% figure.3 Encouragingly, both thresholds improve at nearly the same rate, with doubling times of 213 and 212 days respectively,3 so the reliable horizon is not falling behind — it is just running about two doublings, roughly fourteen months, behind the headline.3

The same model, two thresholds Fig. 02 · Claude 3.7 Sonnet
50% 80% 59 MIN 15 MIN TASK LENGTH THE MODEL SUSTAINS AT EACH RELIABILITY THRESHOLD
Demanding 80% instead of 50% costs roughly three quarters of your usable task length.3 Plan capacity against the threshold you actually ship at.

Even 80% understates the difficulty, because a single-attempt score hides why a run failed. Recent work on agent reliability argues that pass@1 cannot distinguish a model that consistently muddles through a two-hour task from one that either nails it or fails catastrophically, run to run — the aggregate is identical, the operational risk is not.4 If you are staking a client deliverable on an agent, variance across repeated runs matters more than the mean.

The operator's version

Capability tells you what is possible. Reliability tells you what is shippable. They are separated by about fourteen months of model progress — or by a loop you build yourself, now.

Prompting, then context, then harnesses

The field's own framing has moved three times in five years. A recent roadmap of long-horizon agent research splits it cleanly: prompt engineering from roughly 2020 to 2023, context engineering from 2023 to 2025, and runtime harnesses from 2025 onward.5 Each stage moved the locus of engineering further out of the model and further into the system wrapped around it.

Practitioners felt the last shift as a step change rather than a gradient. Harrison Chase of LangChain has described a distinct vibe shift around late 2025, when models became good enough that the field "moved from scaffolds to harnesses" — and noted that the durable idea underneath is almost embarrassingly simple: run the model in a loop and let it choose what to pull into context.6 The simplicity is the point. The generality of the loop is what makes it worth engineering carefully.

Why append-only loops fail

Most agents in production are still descendants of ReAct: an iterative reason–act–observe cycle that appends every step to a growing transcript.7 That design is elegant and it does not survive length. Because the context is append-only, long-horizon tasks hit context saturation — critical signals get buried in accumulated noise and reasoning degrades.7

The failure is not simply running out of window. Studies of long-context web agents report success rates of 40–50% on short-horizon variants of a task falling below 10% once the same task is embedded in a longer interaction history — even when the relevant information is still technically inside the context window.2 The information was present and the agent could not use it. That distinction is the whole argument for managing context as an explicit engineering concern rather than trusting a larger window to fix it.

Append-only versus managed context Fig. 03
APPEND-ONLY SIGNAL FROM TURN 1 IS STILL IN THE WINDOW — AND NO LONGER RECOVERABLE MANAGED · FOLDED STATE HEADROOM PRESERVED FOR THE NEXT n TURNS EARLIER TURNS COMPRESSED TO A COMPACT, RE-READABLE STATE
Folding, summarisation and constant-memory schemes all attack the same failure: an append-only transcript buries its own signal.8

The research response is a family of techniques that treat the transcript as something to be actively sculpted. Context-folding lets an agent manage its own working context rather than accumulate it.8 MEM1 trains agents to operate with effectively constant memory across long multi-turn tasks.9 Anthropic now publishes context engineering as a first-class engineering practice rather than a prompt-writing tip.10

The loop is the product

The clearest evidence that this is engineering rather than prompt craft: optimising how context is assembled beats hand-tuning it, by a lot. On SWE-bench Verified, Meta Context Engineering reports 89.1% against 70.7% for hand-engineered baselines.11 Same models. Same benchmark. Eighteen points from the assembly layer.

That is the number I would put in front of anyone still treating the loop as glue code. If a systematic approach to what enters context outperforms an expert's manual assembly by that margin, the loop is not plumbing around the intelligence. It is where a large share of the realised intelligence actually comes from.

How this changes what I build

Across the Gigaverse ventures the pattern that has held up is unglamorous: decompose long work into segments short enough to sit inside the reliable horizon, then make the seams explicit. Every segment gets a defined input state, a verification step that does not trust the agent's own account of its work, and a written hand-off. When something fails, it fails inside one segment with a recoverable state, instead of somewhere in hour three of an unrecoverable transcript.

Concretely, that means four things I now treat as non-negotiable. Bound the horizon — if a job needs two hours of sustained agency, it needs to become several jobs. Manage context deliberately, folding or re-stating rather than appending. Verify outside the loop, because a step that grades its own homework is not a control. And measure variance, not just averages, because the distribution across runs is what determines whether you can promise an outcome to a client.

None of this is exotic. It is the same instinct that produced CI pipelines and staged rollouts, applied to a component that is probabilistic instead of deterministic.

Planning against the trend

The last question an operator has to answer is how long to wait. If the reliable horizon is fourteen months behind the headline, the temptation is to sit still and let the models arrive.

The trend does not obviously reward waiting. The seven-month doubling has held across six years and is robust to substantial measurement error — METR notes that being off by a factor of ten shifts arrival dates by only about two years, because the curve is so steep.1 More recently the slope may have steepened: fitted to 2024–2025 data alone, horizons doubled roughly every four months.12 Under the seven-month rate, a full working month of human effort — about 167 hours — arrives at 50% reliability around late 2029; under the faster fit, meaningful probability lands in 2027.13

Two doubling rates, projected Fig. 04 · log₂ scale
1 hr 1 day 1 week 1 month 2025 2026 2027 2028 2029 2030 4-MONTH DOUBLING (2024–25 FIT) 7-MONTH DOUBLING (6-YEAR TREND) 167 HRS
Projection of two published doubling rates from a ~1-hour horizon at the start of 2025; not a forecast by the original authors. The two rates put a working-month horizon roughly two years apart — which is exactly the span over which a company decides whether it built the loop or waited.1213
7 moHorizon doubling, 2019–2025
4 moDoubling on 2024–25 fit
¼Usable length at 80% vs 50%
89.1%SWE-bench Verified, optimised context

The uncomfortable implication of the trend is that the loop you build now is temporary. Some of today's careful scaffolding will be redundant in two years — Chase expects some manual scaffolding to fall away as models improve.6 That is fine, and it is not an argument for waiting. The segmentation, the verification gates, the instrumentation of variance: those are properties of a system that ships reliably, and they will outlast whichever model is underneath.

What I would watch over the next year is not the headline horizon. It is whether the 80% curve keeps pace with the 50% curve, and whether variance across runs narrows. Those two are what convert a capable agent into a business you can make promises about.

Notes & references

  1. T. Kwa, B. West, J. Becker et al. (METR), “Measuring AI Ability to Complete Long Software Tasks,” 19 Mar 2025. Establishes the time-horizon metric and the ~7-month doubling over six years; also reports the robustness of the trend to large measurement error. metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasksarXiv:2503.14499
  2. “Beyond the Leaderboard: A Synthesis of Tool-Use, Planning, and Reasoning Failures in Large Language Model Agents,” pre-print arXiv:2607.05775. Summarises the ~100%-under-4-minutes / <10%-beyond-4-hours finding, and the long-context degradation result in which 40–50% short-horizon success falls below 10% when embedded in a longer history despite the information remaining in-window. arXiv:2607.05775
  3. “Is there a half-life for the success rates of AI agents?” pre-print arXiv:2505.05115. Reports Claude 3.7 Sonnet at 59 minutes (50%) versus ~15 minutes (80%); doubling times of 212 days (50%) and 213 days (80%); and the resulting ~14-month, two-doubling lag. arXiv:2505.05115
  4. “Beyond pass@1: A Reliability Science Framework for Long-Horizon LLM Agents,” pre-print arXiv:2603.29231. Argues single-attempt metrics cannot separate consistent partial competence from high-variance success. arXiv:2603.29231
  5. RUC-NLPIR, “Awesome-Long-Horizon-Agents: The roadmap of long-horizon agents.” Stages the field as prompt engineering (2020–2023), context engineering (2023–2025) and runtime harnesses (2025–present). github.com/RUC-NLPIR/Awesome-Long-Horizon-Agents
  6. H. Chase, in conversation with Sequoia Capital, “Context Engineering Long-Horizon Agents.” Describes the late-2025 shift “from scaffolds to harnesses,” the loop as the core idea, and the expectation that some manual scaffolding becomes unnecessary. sequoiacap.com/podcast/context-engineering-our-way-to-long-horizon-agents-langchains-harrison-chase
  7. S. Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models.” The reason–action–observation loop underpinning most contemporary agents; the append-only context it implies is identified as the source of context saturation in AgentFold, arXiv:2510.24699, and FoldAct, arXiv:2512.22733. arXiv:2210.03629arXiv:2510.24699arXiv:2512.22733
  8. W. Sun, M. Lu, Z. Ling et al., “Scaling long-horizon LLM agent via context-folding,” 2025. Enables an agent to actively manage its own working context. arXiv:2510.11967
  9. Z. Zhou et al., “MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents,” 2025. End-to-end RL for constant-memory operation across long multi-turn tasks. arXiv:2506.15841
  10. Anthropic, “Effective context engineering for AI agents,” 2025. anthropic.com/engineering/effective-context-engineering-for-ai-agents
  11. Reported in “SWE-EVO: Benchmarking Coding Agents in Long-Horizon Software Evolution Scenarios,” pre-print arXiv:2512.18470, citing Meta Context Engineering (Ye et al., 2026): 89.1% on SWE-bench Verified versus 70.7% for hand-engineered baselines. arXiv:2512.18470
  12. AI Digest, “A new Moore's Law for AI agents.” Reports task length correlating with success at R²=0.83, and horizons doubling every ~4 months across 2024–2025 versus ~7 months across 2019–2025, with month-long tasks possible by 2027 if the faster trend holds. theaidigest.org/time-horizons
  13. “Task-completion time horizon (METR),” AI Wiki. Notes that on the seven-month doubling a ~167-hour (working month) horizon at 50% reliability arrives around late 2029, ±~2 years, and that fitting only 2024–25 data shortens this by about 2.5 years. aiwiki.ai/wiki/metr_time_horizon

All figures are drawn from the published values in these sources. Where a chart interpolates or projects beyond the published data points, the caption says so.

Keep reading

Essays like this, by email.

A dispatch on building AI-native companies — the systems, the agents, and the operating model.

Weekly-ish · No spam · Unsubscribe anytime