Empirical study · long-horizon agentic optimization · July 2026

Stuck Agents: Optimization Plateaus and the Case for Context Resets

Fleets of LLM coding agents grinding on two hard optimization tasks produce real research-grade artifacts — then get stuck far below what is achievable. Keeping the code and throwing away the conversation can break plateaus that continuation does not.

continue = keep conversation reset = keep artifact, blank conversation agent: GitHub Copilot CLI · gpt‑5.5 · xhigh x‑axis everywhere: credits (billed compute) ● living report — sections marked “data incoming” update as runs complete

0Background & task descriptions

We run fleets of independent LLM coding-agent sessions (“seeds”) on optimization tasks with a hidden numeric grader: the agent edits a workspace, submits, receives a score, and keeps going inside one persistent conversation until a fixed credit budget (billed model compute) is exhausted. All progress curves in this report are plotted against cumulative credits.

  • Kernel take-home. Optimize a compute kernel for a simulated architecture; score is cycles, lower is better, measured by a hardened, cheat-proofed grader. The task comes from a real hiring take-home; task materials report a best human score of 950, while the best open-source human solution scores 1157. Fleet: 8 seeds × ~105K credits.
  • tinyCIFAR gz-golf. Ship a self-contained artifact that trains/loads a CIFAR-10 classifier; score is a merit that rewards sealed-test accuracy and penalizes gzipped artifact size. The brief — 94% at 45 KB — defines a hard threshold at merit 0.575. Grading is against a sealed 10k test set. Fleet: 8 independent seeds at ~31–68K trace-accounted credits, plus one correlated seed-1 restart retained only as a recovery case study.

Both tasks are “wide”: many families of approaches, real headroom, no way to reward-hack the number — a fair proxy for agentic research work, where getting stuck is a measurable phenomenon rather than an artifact of a toy task.

1Trajectories: real artifacts, then a long grind

Every seed follows the same arc: a violent early descent, then an ever-slower grind punctuated by rare jumps. Dots are individual graded submissions; lines are best-so-far. The linear view shows that most of the budget is spent on a near-flat tail; the log–log view shows the descent is smooth and lawful — not a wall.

fig_traj_kernel.png
Kernel fleet, 8 seeds. Left: linear credits, zoomed to the 800–2,600-cycle band where the entire second half of the campaign plays out. Right: log–log over the working range (all seeds descend from the 147,734-cycle task baseline within their first few hundred credits; trivial identity-kernel submissions are excluded). Green/gold dashed: best open-source human (1157) and leaderboard #1 (950). The submission clouds show experimentation never stops — scores keep scattering upward even while best-so-far is flat.
fig_traj_cifar.png
tinyCIFAR fleet, 8 independent seeds. Merit vs credits, linear and log-x. Green dashed: the brief (94% @ 45 KB ⇒ merit 0.575). One seed (r7) crosses on its own; the rest plateau below it at heights that vary 3× across seeds. Dots at merit 0 are failed/rejected submissions. The dashed black curve is an archived seed-1 restart: it shares an inherited workspace prefix with the canonical r1 lineage, so it is not counted as an independent seed; its x-axis charges that ~7.7K-credit prefix. Hollow points and dotted vertical endpoints show post-trace tail outcomes at the final known credit coordinate: their true x-values are larger but unknown, so these markers are lower bounds and are excluded from quantitative fits.

The artifacts are genuinely good

  • Kernel: campaign record 1068 cycles (produced by a reset fork, §3) — better than the best open-source human solution (1157). The record run’s method: the fleet-shared vectorized skeleton, with the edge coming from instruction scheduling and engine balancing — the agent wrote an offline beam-search over schedules (cross_beam.py) and ran it against the simulator rather than hand-editing kernels.
  • tinyCIFAR: two of 20 reset forks crossed the hard brief; the best reset artifact reached 94.07% sealed-test accuracy in 39.69 KB (merit 0.616 vs brief 0.575), narrowly above the best uninterrupted baseline artifact (94.14% at 41.31 KB, merit 0.612). Method: a compact convnet with quantized, gzip-friendly weights — and crucially, the winning move was abandoning the large-checkpoint strategy (~130–150 KB) and rebuilding small, not compressing the incumbent harder.

2Three regularities of the grind

1 · The fleet mean is a log-sigmoid. Averaging seeds yields a clean 4-parameter logistic in log-credits with a finite implied floor — on both tasks — even though no individual seed looks sigmoid.

fig2_fit_both.png
Fleet mean + log-sigmoid fit. Kernel (left): geo-mean of 8 seeds, R²=0.997, implied floor ≈1,113 cycles. tinyCIFAR (right): mean of 8 independent seeds, R²=0.996, implied plateau ≈0.398 merit — well below the 0.575 brief. Grey: individual seeds. Note (§3): interventions later break these floors — they are properties of the uninterrupted fleet, not of the task.

2 · Spread across seeds does not shrink. If seeds were converging on one answer, the cross-seed band would close with budget. It does not.

fig2_spread_both.png
10–90% cross-seed band (blue) and its width (red). Kernel: width stays a roughly constant fraction of the median across two decades of credits. tinyCIFAR: the band never closes. More budget buys a better middle, not agreement.

3 · Ranking is unstable. The seed that leads early is not the one that wins.

fig_rank_bump.png
Rank of each seed at credit checkpoints (1 = best). Kernel: the 1K-credit leader (k7) finishes 3rd; the eventual winner (k3) climbs from rank 8 at 15K. tinyCIFAR: the eventual winner (r7) sat at rank 6 at 1K while r5 led — r7’s decisive jump lands between 1K and 2K, after which it holds; the mid-pack keeps trading places to the end. Seeds not yet graded at a checkpoint rank last.
Sigmoid mean, non-shrinking spread, unstable ranks: exactly what a mixture of heterogeneous basins produces — and hard to get from one shared learning curve plus noise. §5 makes that argument constructive. First, the intervention it motivates.
✓ replication complete Long-context replication: everything above was measured with the agent’s conversation auto-compacting at ~218K tokens (~200K of conversation; the fleets compacted 22–28× per seed — verified from session compaction events). A completed 8-seed cifar baseline fleet at the long_context tier (compaction at ~738K, 3.4×) tests how much of the plateau structure is compaction-dependent. Its best merit was 0.526; none of the eight crossed the 0.575 brief.

3The reset intervention: keep the code, drop the context

Fork a stuck run at its plateau into two arms with identical budgets: continue resumes the same conversation on the same workspace; reset keeps the exact same workspace/artifact but starts a blank conversation — strictly less information: no notes, no summary, no hints. Any difference between the arms is the causal effect of the accumulated context.

3.1 tinyCIFAR — 8 plateaued branch points + a no-headroom control

fig4_cifar_forks.png
All nine branch points (both waves + control), fork credits on x. Every fork starts from a verified-cold plateau. Across the 8 stuck branch points, reset escapes in 8/20 forks by beating their own incumbent by at least 0.02 merit, and 2/20 cross the fixed brief; continue escapes in 0/20. Mean reset advantage is positive at 5 of 8 stuck branch points and tied at 3; the effects are heterogeneous, with large gains at some high-headroom points and honest nulls at others. The gold no-headroom control shows the predicted null: neither arm escapes the 0.643 incumbent, with fork-produced best merits of 0.607–0.609. Bottom-right, the mechanism: escapes are strategy switches to smaller artifacts. Fork credit clocks are reconstructed as in the kernel loader (authoritative totals over gap-capped active time).

Complete: all 44 forks (wave 1 + wave 2 + control) ran to full budget. The 4 control forks finished at 0.607–0.609 against the 0.643 incumbent — neither arm escaped, as predicted.

3.2 Kernel — 12 branch points across the hot→cold gradient

fig4_kernel_forks.png
Top: per-branch curves (3 continue + 3 reset forks each, budget-matched; dashed grey = the branch’s incumbent; gold titles = the three added late branches). At the cold-but-escapable branch cp3late, reset sweeps all three forks below the incumbent — best 1068 cycles, the campaign record — while all three continues sit at 1097–1099. Bottom: best-of-arm advantage per branch. Large where a basin hides headroom; noisy at hot branches where continuation still has easy progress (cp3mid, cp6mid); small-but-mostly-positive across the cold tail. The new branches sharpen the picture: cp4late/cp7late (truly near-ceiling) give ±small effects, while cp8late — the fleet’s worst seed, whose “0.0%” is residual to its own run, not to the fleet frontier — still hides absolute room and reset finds −39. Headroom-to-the-frontier, not time-in-run, is what predicts the reset payoff.
Across both tasks the same sentence holds: continuation cannot leave the basin its conversation is committed to; a context reset on the same artifact can. The effect is big where the plateau hides headroom (cifar mean +0.03 merit across 8 stuck branch points; at kernel cp3late, −29 cycles and a record), and goes to null exactly where it should: the near-ceiling control seed and the truly near-ceiling kernel branches. That dose-response-plus-null is what a causal headroom-recovery story requires.

3.3 Coordination at scale: communication and repeated branch selection

tinyCIFAR communication at eight agents versus independent baselines, with an iso-cost panel
Communication @8, first 40-hour leg. The left panel shows all eight checkpoint trajectories on a mean-per-agent credit clock. The iso-cost panel charges expected independent performance at single-run cost and both best-of-eight outcomes at aggregate fleet cost. At 157,405 checkpointed communication credits, best-of-comm reaches 0.5176 merit versus 0.3998 for the independent average and 0.6116 for independent best-of-eight. The hard Harbor timeout interrupted each final episode; those unpriced tails are excluded from this snapshot, and the fleet was subsequently resumed toward its 400K aggregate cap.
kernel reset and continuation branch-selection trajectories through two fork rounds
Powered branch selection through round two. Reset round 1 selected r1b5 at 1,235 cycles and the resumed lineage reached 1,228 before entering an active second reset fork. Continue round 1 selected r1b3 at 1,224; round 2 selected r2b2 at 1,213, which remains the selected-lineage record. The x-axis follows selected-lineage credits plus each branch’s local credits; it is intentionally not the aggregate protocol-spend axis.

4Advanced interventions built on reset

Plain reset wastes nothing but the context — but it also learns nothing from the discarded branch. Three protocols, smoke-tested on the kernel task, push past that:

Branch-select smoke passed

main leg runs ↓ stall detected (no gain for S credits) → fork K reset branches → race them on equal budget → best branch becomes main; rest dropped

Automates §3 as a policy: a stall detector triggers the fork; selection keeps fleet width at 1. Controls: K=0 (plain continue) and K=1 (reset without selection).

Branch-distill smoke passed

fork K reset branches ↓ each writes a post-mortem note → distiller merges: winner workspace + ranked all-branch report → ONE distill leg resumes with the merged material

Selection discards K−1 branches’ discoveries; distillation folds them back in as a structured note on the winner’s workspace.

Board (broadcast) smoke passed

N concurrent runs ↓ each episode: post score + 1-line STATUS to a shared board; read peers’ entries control: same N, no board

The lightest-touch social intervention: does merely seeing that a peer is ahead (and roughly how) decorrelate basins the way a reset does?

● data incoming All three protocols have validated drivers and passed smoke runs on the kernel task; powered branch-select and board arms are active, while branch-distill remains queued. Per-protocol results (vs K=0 / K=1 controls) will slot in here.

5Why resets work: a model organism and a mixture model

Model a run as a ratcheted trap-mixture: on arrival in a basin it draws a latent (floor, escape-rate) pair; within the basin, improvements arrive memorylessly at a rate that falls as the run nears its floor; the artifact ratchets. As a physical counterpart we use a stateful SLS organism: clause-weighting local search (Breakout/DLM-style) on over-constrained MAX-3SAT, where the accumulated clause weights are history-derived beliefs — an explicit analogue of the agent’s context, separate from its position (current assignment) and its artifact (best assignment). A randomized DPLL/branch-and-bound variant, where the committed DFS stack plays the context role, gives the same conclusions. Both organisms reproduce §2:

fig5_organisms.png
Rows: trap-mixture simulation (top), stateful-SLS organism (bottom). Columns: (1) the fleet mean is a log-sigmoid (R²=0.996 / 0.981) even though individual runs are step-like and heterogeneous — the sigmoid is an ensemble artifact of averaging over basins; (2) cross-run spread does not shrink; (3) the waiting-time signature: pooled expected-further-wait rises with stagnation (a single memoryless trap would be flat at 1) — being stuck longer is evidence of a worse basin.

Long-tailed waiting times license restarts

Under a rising mean-residual-life (equivalently, decreasing hazard), cutting the wait and redrawing dominates persisting — the classical restart argument from combinatorial search: heavy-tailed runtimes in backtracking and local search (Gomes, Selman & Kautz), optimal restart schedules (Luby, Sinclair & Zuckerman), iterated local search (Lourenço, Martin & Stützle). We defer the formal decreasing-hazard ⇒ restart-dominance argument to a follow-up; the figure above shows the empirical licensing in both organisms and it holds in the real kernel fleet as well.

How our setting differs from SAT restarts

  • The state ratchets. Our reset keeps the artifact — it is the ILS move (restart the search state, keep the incumbent), not a full restart. Full restarts pay the re-descent and lose at realistic budgets (in the calibrated simulation: continue 0.11, reset 0.25, fresh 0.19 probability of beating the incumbent within a fork budget).
  • The trap lives in the context. In the SLS organism the basin commitment is carried by the learned clause weights; in our agents it is carried by the conversation — accumulated framing, sunk explanations, self-consistency pressure. That is why blanking the context alone, with zero information added, is a sufficient perturbation.
  • The schedule is adaptive. Classical schedules (Luby) are budget-oblivious; our stall detector triggers on the measured plateau, which is what branch-select (§4) operationalizes.

§References & reproducibility

  • C. Gomes, B. Selman, H. Kautz — Boosting Combinatorial Search Through Randomization, AAAI 1998; C. Gomes, B. Selman, N. Crato, H. Kautz — Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems, J. Automated Reasoning 24, 2000.
  • M. Luby, A. Sinclair, D. Zuckerman — Optimal Speedup of Las Vegas Algorithms, IPL 47, 1993.
  • H. Lourenço, O. Martin, T. Stützle — Iterated Local Search, Handbook of Metaheuristics, 2003.

Data & code: /data/t-jackcai/frontier-runs — fleets (tinycifar-copilot-g55x-*, kernel-cpbase-*), fork studies (cvr_*, kernel_fork4_*), fits (cifar_fleet.py), organisms (sat_stateful_organism.py, sat_bnb_organism.py, sim_object_*.py). All cifar accuracies are sealed-test; kernel scores from the hardened grader. Continue/reset arms are credit-matched within every comparison; reset receives a strict information subset of continue. Trivial identity-baseline kernel submissions are excluded. Baseline cifar curves use deduplicated billing-trace step clocks; fork curves use gap-capped active-time apportionment between billing anchors; only compaction-event placement uses linear interpolation. Where an interrupted final episode was not mirrored, trace totals are lower bounds. The trajectory figure shows those tail outcomes with explicit lower-bound markers; all quantitative baseline fits, bands, ranks, and credit totals clip at the final trace row. The original baselines and all continue/reset comparisons used the Copilot default context tier (conversation auto-compaction at ~218K total tokens, measured via preCompactionTokens; cifar median 218,532, kernel median 218,697). The separately labeled long-context replication is not pooled into those comparisons.