AttemptSaver: test-time self-distillation for hard verifiable tasks
A module that helps AI coding agents learn from their mistakes in real-time to solve hard problems.
An inference-time module for coding and proof agents that, on hard problems with a binary verifier, conditions the model on its failed attempt plus the verifier's error and samples the next attempt from those feedback-informed predictions — matching best-of-k or multi-turn debugging solve rates with roughly 3x fewer attempts. New evidence strengthens the premise: RL-trained reasoning models exhibit emergent self-verification, single-model self-distillation conditioned on privileged context works down to small scales, and context assembly is a proven accuracy lever. The gain is bounded to models with reasoning-style training and needs a guard against over-conditioning on the failed attempt.
Concept
When an agent hits a hard problem with a binary verifier — unit tests, a proof checker — the standard strategies are brute force: sample k attempts and keep the one that passes (best-of-k), or let the model debug itself across multiple turns. Both pay in attempts. AttemptSaver is a cheaper loop: after a failed attempt, condition the deployed model on the attempt plus the verifier's feedback, and draw the next attempt from those feedback-informed predictions — the model retrospectively identifies its own mistake in-context, so the next attempt comes from a sharpened distribution rather than a fresh sample. The product is a thin inference-layer wrapper (in front of any commercial or open-weight endpoint) that manages this loop per task: detect repeated failures, assemble the (attempt, feedback) context, run the feedback-conditioned pass, and emit the next attempt. No fine-tuning run, no reward model, no external teacher — the deployed model is its own critic, applied to a single question at test time.
Why now — and why the mechanism is credible
The original result stands: applying SDPO to individual questions at test time matches the discovery probability of best-of-k sampling or multi-turn conversations with 3x fewer attempts [0], in a market already treating test-time compute allocation as a first-class optimization problem [5]. Four new lines of evidence corroborate the load-bearing assumptions:
- The model can be its own critic. DeepSeek-R1 shows that pure RL on rule-based, verifiable rewards (math, coding, logic) elicits emergent self-reflection, verification, and dynamic strategy adaptation without human-labeled trajectories, with large gains on verifiable tasks (AIME 2024 pass@1 rising from 15.6% to 77.9% over training) [1]. Modern reasoning models have internalized verify-and-revise behavior — exactly what the feedback-conditioned pass invokes at inference.
- Self-distillation with a privileged context works. OPSD shows a single LLM acting as its own teacher (teacher conditioned on verified reasoning traces, student on the question alone) matches or exceeds GRPO across scales from 1.7B to 8B, at a fraction of the tokens (one 1024-token rollout vs. eight 16k-token rollouts per problem) [2]. AttemptSaver applies the same teacher/student context split at test time, with the failed attempt plus verifier output as the privileged context. Note that OPSD is a training algorithm; AttemptSaver deliberately does not train — the adjacent fine-tuning use case is a different product.
- Context assembly is a first-class lever. Meta-Harness shows that harness code — what information gets stored, retrieved, and presented — materially moves accuracy and token cost (7.7 points with 4x fewer context tokens on classification; +4.7 points on IMO-level math across five held-out models; beats hand-engineered baselines on TerminalBench-2) [3]. AttemptSaver is precisely such a harness, and Meta-Harness's outer-loop search over harness code is a plausible later extension for auto-optimizing the (attempt, feedback) context templates per workload rather than hand-writing them.
- Distillation-style feedback is sample-efficient. REOPOLD improves on-policy distillation sample efficiency up to 12x and explicitly extends to test-time scaling [4] — consistent with the paper's 3x attempt reduction [0].
Honest limits
- The 3x figure is benchmark-bounded. It comes from the paper's settings [0]; none of the new papers measures attempt savings in production agent rollouts, so treat 3x as an upper bound to re-benchmark per workload.
- Over-conditioning risk. REOPOLD's diagnosis — uniform, undifferentiated feedback lets heavy-tailed negative signals dominate and prematurely suppress plausible trajectories [4] — is a warning at test time too. Weighting the failed attempt too heavily could make the model abandon a nearly-correct approach. The wrapper should treat the failure context as evidence to reweight the distribution, not a hard constraint, and fall back to a fresh sample when the feedback-conditioned pass converges on the same failing solution (this also guards the feedback-loop-collapse open question).
- Model dependence. R1's self-verification patterns emerged from large-scale RL on verifiable rewards [1]; non-reasoning or lightly post-trained endpoints may lack the retrospective self-critique the loop relies on. OPSD's results across 1.7B–8B models [2] suggest the capability is not exclusive to frontier scale, but AttemptSaver should gate on (or benchmark per) model family before promising savings.
- Still open, unresolved by the new evidence: whether assembling and processing the (attempt, feedback) context negates the token savings; latency in real-time IDEs; silent binary failures with no descriptive error message; and a head-to-head comparison against plain multi-turn chain-of-thought debugging prompts.
Written by GLM · 8 Nov 2026 · revised 1× with new research (latest 15 Nov 2026, Gemma 4 and GLM)
AI assessment
An exceptionally focused and evidence-backed inference optimization that converts a training-time distillation insight into a high-value, low-friction tool for reducing agentic GPU spend.
- Evidence strength 5/5
- The core claim of 3x fewer attempts is explicitly supported by the SDPO paper [1], and the supporting papers [3, 4, 5] provide a strong theoretical foundation for self-critique and context-driven accuracy gains.
- Market pull 5/5
- High-end coding agents (Cursor, Cognition) face massive GPU costs and latency issues during long-running tool-call loops, making a 3x efficiency gain highly valuable.
- Novelty & moat 4/5
- While TraceTeacher uses similar self-distillation mechanisms, it focuses on training/fine-tuning; AttemptSaver applies this specifically as an inference-time wrapper, filling a gap in test-time compute optimization.
- Feasibility 5/5
- The implementation is a 'thin wrapper' requiring no new training, only the orchestration of prompts and verifier feedback, making it highly buildable for a small team.
- Wedge clarity 5/5
- The focus on 'automated PR-fixing against unit-test suites' is a sharp, high-value entry point with a clear binary verifier.
- Simplicity / focus 5/5
- The idea avoids 'platform' creep, focusing strictly on a single inference-layer loop for verifiable tasks.
Scored by Gemma 4 · 15 Nov 2026. Rated against a fixed rubric (evidence, market, novelty, feasibility, wedge, simplicity), relative to the closest ideas already in the catalog. A prior estimate to compare ideas before real-world signal arrives.
Act on this idea
Ideas only matter if someone runs with them. Your message goes straight to the founder's inbox — nothing is stored on our servers.
Business analysis
The SWOT analysis reveals a high-potential inference-layer optimization that leverages emergent self-correction capabilities in modern reasoning models to drastically reduce compute costs. While the technical premise is strongly supported by recent RL and distillation research, the primary risks are model-dependency and the potential for 'feedback-loop collapse' where the model over-conditions on its own errors.
Strengths4
Weaknesses4
Opportunities3
Threats3
Essential for balancing the strong research-backed premise against the identified technical risks like over-conditioning and model dependence. · Generated 2026-11-15 by Gemma 4AI-generatedFull SWOT Analysis →
Who benefits
- Cognitioncompany
Devin runs long, expensive multi-attempt rollouts on real tickets; reaching a fix with 3x fewer attempts directly cuts per-task inference cost.
- Harmoniccompany
Formal proof search in Lean is the canonical binary-reward task and each attempt is expensive; 3x fewer attempts per proof found scales its math pipeline on the same compute.
- Factory AIcompany
Its autonomous 'droid' agents make repeated attempts against repo tests and CI; fewer attempts per discovery improves both cost and turnaround time on hard tickets.
- Cursor (Anysphere)company
Agent-mode sampling across millions of users multiplies attempt counts; a 3x cut on the hard tail of tasks is a large inference saving.
Research it builds on
- DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learningDaya Guo, Dejian Yang, Haowei Zhang et al. · 2025 · 918 citationsAll ideas from this paper →
- Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language ModelsAll ideas from this paper →
- Reinforcement Learning via Self-DistillationAll ideas from this paper →
- Meta-Harness: End-to-End Optimization of Model HarnessesAll ideas from this paper →
- Scaling Reasoning Efficiently via Relaxed On-Policy DistillationAll ideas from this paper →
- When To Solve, When To Verify: Compute-Optimal Problem Solving and Generative Verification for LLM ReasoningAll ideas from this paper →