Apply to my task
arXiv:2610.33861 ★ 94 Oct 24, 2026

ReGE: synthesizing an agent’s past attempts into one guide for a clean restart

Key result

Incomplete, even contradictory logs from failed attempts turned out to be more useful than “advice off the top of its head.” If the coach doesn’t see the logs and just writes tips, the benefit is zero, same as a run with no advice. The ReGE method lets you stop an agent from stepping on the same rakes without switching models or fine-tuning. A single coach-model call reads the logs of all attempts at once and writes one self-contained guide. The agent starts from a clean state and follows that guide. One attempt found a fact, another a command, a third a trap. Together they provide what none of them had alone. And the guide is about 4x shorter than stitched-together individual summaries, with no loss in success.

01

TL;DR

ReGE (Re-execution Guided by Experience) is a technique where the agent first tries a task several times (four in the paper), and then a single call to a “coach” model turns the logs of all attempts into a self-contained guide. With that guide, the agent starts over, from a clean state. The guide contains a step-by-step plan, exact paths, values, and commands, the facts discovered, and the traps earlier attempts tripped over. The same model does everything: it’s both its own student and its own coach.

The main finding: incomplete and even contradictory experience is useful. One attempt found the key fact, another a working command, a third ran into a trap, and together they give what none of them had alone. The method works best on exactly these mixed tasks, where some attempts failed and some succeeded. If you don’t give the coach the logs and just ask it to write advice, there’s no benefit: advice “off the top of its head” is no better than a run with no advice. It also matters that the guide captures the process (steps and commands), not just final answers. With the process included, the new run takes noticeably fewer steps and reaches an answer more often.

The method boils down to four steps: collect several runs → merge them into one block → write a guide in a single call → rerun the agent. The attempts need to be combined together, not one by one. Joint synthesis produces a guide about four times shorter than stitching together independent summaries, with no loss in success.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Run the agent K times on one task (K=4 in the paper) → K logs
STEP 2: Assemble the logs into one block: each attempt separately, steps in order,
        final files/answers at the end. Trim the length. Do NOT add “success/failure” labels
STEP 3: ONE “coach” call (same model): task + all logs together
        → guide: ordered plan, exact paths/commands/formats, traps,
          a candidate answer + a way to verify it
STEP 4: A fresh agent run from a clean state: task + guide
        → the agent checks the guide against reality, adapts, verifies

Steps 1 and 4 are agent runs. Steps 2–3 are a single request to the model.

03

Example in Practice

Task: You sell on Amazon and ask an agent (Claude Code) to set up a daily export of stock levels from Zoho Inventory to a Google Sheet. On every run, the agent gets stuck in a different place. In one run, it discovered that the API returns stock levels page by page. In another, it found a working request with a warehouse filter. In a third, it hit the rate limit and broke the token. The fourth run never finished.

Prompt (for the “coach,” in a new session, after pasting in the logs of the four runs):

<Role>
You are a coach for an agent. You’re given the logs of several attempts to solve one task.
Your job is to write a guide for a new attempt from scratch.
</Role>

<Task>
Set up a daily export of stock levels from Zoho Inventory to the Google Sheet “Amazon Stock”.
Files and settings from past attempts were not kept: the agent will start from zero.
</Task>

<Attempts>
<Attempt_1> ...log: reasoning and commands step by step, then the final files... </Attempt_1>
<Attempt_2> ... </Attempt_2>
<Attempt_3> ... </Attempt_3>
<Attempt_4> ... </Attempt_4>
</Attempts>

<GuideRequirements>
- The guide must make sense without reading the logs: it is self-contained.
- Write the plan in execution order.
- Put exact paths, values, commands, and format requirements next to the step where they’re needed.
- Next to the steps, list the traps: what broke and how to avoid it.
- If the logs support a ready-made solution, include it and a way to verify it.
- You don’t know which attempts succeeded: take nothing on faith, and mark what the agent must verify in the real environment.
</GuideRequirements>

Then paste the original task and the resulting guide into a new, clean agent session.

Result: The “coach” produces one coherent document: a numbered plan from API access to writing into the sheet. It will include the exact requests and parameters found in different runs, plus separate warnings about the rate limit and the token. The new agent will follow the plan but check every step against what it actually sees. Expect less wandering and a shorter path to a working result than with a “raw” run.

04

Why It Works

Weakness. A single agent run sees only its own branch. It trips over a trap that another attempt already reached and got around. Raw logs from several runs are hard to read too: they’re long, noisy, and it’s unclear what to trust.

Strength. A model is good at compressing long text and connecting scattered pieces. When all attempts sit in one context, it can see that a fact from attempt 1 is needed for a step from attempt 3. That doesn’t work if you summarize each attempt separately: the connections are lost before merging.

How the method exploits this. One call sees all the logs at once and decides what to keep and how to connect it. The guide comes out short and actionable. The fresh run doesn’t inherit state (files and settings are reset), so the agent redoes the operations, but now with a map. And the absence of “success/failure” labels forces it to verify the recommendations itself.

Control levers: - Number of attempts K. One attempt already helps a lot; four help even more. For simple tasks, two are enough. - Process in the logs. Provide steps and commands, not just final answers. Without the process, the new run hits the step limit more often. - Guide format. The default is a plan. Instead, you can ask for “explanation + answer.” It’s cheaper, and in one measurement success was slightly higher, in another slightly lower. Choose based on the task. - Verification. Require the guide to include “candidate answer + how to check it.” Then the agent doesn’t take someone else’s answer on faith.

05

Prompt Template

<Role>
You are a coach for an agent. You’re given records of several attempts to solve one task.
Your job is to combine what was found into a single guide for a new attempt from scratch.
</Role>

<Task>
{task}
State of the environment before the new attempt: {what_was_reset_or_not_kept}
</Task>

<Attempts>
<Attempt_1> {log_1} </Attempt_1>
<Attempt_2> {log_2} </Attempt_2>
<Attempt_3> {log_3} </Attempt_3>
<Attempt_4> {log_4} </Attempt_4>
</Attempts>

<GuideRequirements>
- The guide is self-contained: the reader does not see the attempt records.
- Format: {plan_in_execution_order | explanation_and_answer}.
- Exact paths, values, commands, and format requirements go next to the step where they’re needed.
- Next to the steps: traps, what broke and how to get around it.
- If the records support a ready answer or file, include it and a way to verify it.
- Whether the attempts were correct is unknown: mark what the agent must verify itself in the current environment.
</GuideRequirements>

What to fill in: - {task}: the original task statement, as you gave it to the agent. - {what_was_reset_or_not_kept}: for example, “files deleted, settings reset.” - {log_1…4}: the text of each attempt: steps and commands in order, then the outcome. Trim long logs. Don’t add “worked/didn’t work” labels. - {format}: a plan or “explanation + answer.”

🚀 Quick start: paste this into a chat:

Here is the ReGE template (a coach prompt that turns an agent’s past attempts into a guide). Adapt it to my task: [your task].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask what the task is, how many logs you have, what gets reset between attempts, and what guide format you want. It needs this so the guide is self-contained and matches the state of the environment. It will take the <Attempt_N> pattern and the guide requirements from the template.

06

Limitations

⚠️ All attempts failed: the benefit is small and unstable. In some cases success ticks up slightly; in others it stays at zero. The method gathers what was found, but it can’t create a solution out of nothing.

⚠️ All attempts succeeded: there’s almost no gain; a regular run already handles it.

⚠️ You need several runs: the method pays for its sources. The “cheap model = expensive model” win was calculated including the cost of generating the pool, but it holds only on some tasks. One extra run won’t replace several.

⚠️ You need logs that include the process: if you give only the final answers, success drops, and the run takes more steps and hits the limit more often.

⚠️ The effect depends on the task: on mobile control (AndroidWorld), the step savings are zero and the success gain is small.

⚠️ State doesn’t carry over: files and changes from past attempts disappear. The new agent redoes every operation. If the guide contains bad advice, the agent may follow it, so verification in the current environment is mandatory.

⚠️ A simple alternative works almost as well: picking the single best trajectory and handing it to the agent gave results on par with synthesis and used fewer tokens. But that choice requires a judge who knows which attempt is better.

07

How They Tested It

The researchers used four benchmarks: terminal tasks (Terminal-Bench 2.0), SQL over databases (Spider2-Lite), Android control (AndroidWorld), and corpus search (BrowseComp-Plus, 830 questions). They tested two model families, GPT and Claude. The same model played three roles: it generated four attempts, wrote the guide, and redid the task. There was no fine-tuning and no “strong teacher.” They compared against a run without a guide, Reflexion (up to three attempts with self-reflection), AggAgent (iterative log analysis), independent summaries, and simple concatenation of logs.

On average, accuracy rose by 9.9 pp on GPT and 8.8 pp on Claude. The cheap gpt-5.6-luna with ReGE (67.4%) matched the pricier gpt-5.6-sol (67.0%) at 28% of its cost. On BrowseComp-Plus, building the guide took 95–98% fewer tokens than AggAgent, with the same success.

The ablations showed why the method works: - A coach without logs doesn’t help: 74.7% versus 75.7%. - With one attempt, success is 84.3%; with four, 88.3%. - If you give only final answers without the process, success is 85.0% at 14.6 steps versus 88.3% at 9.1 steps. Most of the loss falls on tasks where only one source answered: without the process, the student often runs out of steps before finishing. - The strongest effect is on mixed pools, where some attempts succeeded and some didn’t. There, the gain reaches 21.6 pp on three benchmarks and up to 48 pp on BrowseComp-Plus. - Joint synthesis versus independent summaries: the guide is about four times shorter (5K characters versus 19–20K), with no loss in success.

The surprise was that a neutral coach without logs adds nothing: the gain comes from experience, not from simply “restating the task one more time.”

08

Adaptations and Extrapolations

🔧 Technique: guide format → “explanation + answer” instead of a plan

This is the authors’ own variant (ReGE-A). Replace the format line in the template:

- Format: an explanation of why the answer is what it is, plus the answer itself with a note on how to verify it.

The effect: in one measurement, total tokens dropped by a third and success rose slightly. In another (on a different model), the result was slightly below the plan format. Good for tasks with an answer (research, search), worse for multi-step actions.

💡 Extrapolation (not from the paper): a “note before restarting” in a chat with your agent.

If a Claude Code session has hit a dead end, ask the model itself, before resetting:

Before I start over: write a self-contained note for a new session.
Include: what we figured out, exact paths, commands, and formats, what broke and how to avoid it,
and what you haven’t verified yet. No “this is definitely correct” labels.

This is a simplified one-attempt version. The authors showed that one attempt already helps a lot, but this particular scenario wasn’t tested in the paper.

09

Resources

  • ReGE: Stronger Agents through Experience Synthesis: Jiarong Liang, Yubo Wang, Zijie Liu, Yuxuan Zhang, Ping Nie, Wenhu Chen (University of Waterloo, UNC Chapel Hill, UBC). Preprint.
  • Code: https://github.com/TIGER-AI-Lab/ReGE
  • The exact coach prompts are in Appendix A.2 of the paper (they’re not in the text provided; the template above is reconstructed from the method description).
  • Related methods: Self-MoA, Reflexion, AggAgent, agentic PDR, Self-Consistency.

Research digest

Key result

Incomplete, even contradictory logs from failed attempts turned out to be more useful than “advice off the top of its head.” If the coach doesn’t see the logs and just writes tips, the benefit is zero, same as a run with no advice. The ReGE method lets you stop an agent from stepping on the same rakes without switching models or fine-tuning. A single coach-model call reads the logs of all attempts at once and writes one self-contained guide. The agent starts from a clean state and follows that guide. One attempt found a fact, another a command, a third a trap. Together they provide what none of them had alone. And the guide is about 4x shorter than stitched-together individual summaries, with no loss in success.

Principle

A four-step process: collect K runs (K=4 in the paper) → merge them into one block → one coach call writes the guide → the agent starts over. Don’t put “success/failure” labels in the logs. The coach doesn’t know who was right, so it writes into the guide: “verify this in the real environment.” The agent doesn’t take anything on faith either. Merge the attempts together, not one at a time: the links between attempts get lost if you summarize them separately. It’s like assembling a puzzle from four boxes on one table. If you lay out each box separately, the picture never comes together. The coach and the agent run on the same model. It’s both its own student and its own coach.

Why it works

A single run sees only its own branch. It trips where another attempt already got through. Raw logs are hard to read too: they’re long, noisy, and it’s unclear what to trust. A model is good at compressing long text and connecting pieces. When all attempts sit in one context, it can see that a fact from attempt 1 is needed for a step from attempt 3. The method works best on mixed tasks, where some attempts failed and some succeeded. The experience is incomplete, but the pieces complement each other. The process itself matters too. If you give the coach only final answers, success drops. The new run takes more steps and hits the limit more often. With steps and commands in the logs, it takes a shorter path and reaches an answer more often. One more observation: a single attempt already helps a lot, and four help even more. For simple tasks, two are enough.

When to apply

Agents for code and for working with files and services → long multi-step tasks where every run gets stuck in a new place. Especially when attempts partly succeeded and partly didn’t. NOT a fit if all attempts failed: the method gathers what was found, but it can’t create a solution out of nothing. Not needed when all attempts succeeded either: a regular run already handles it. On mobile control (AndroidWorld), the step savings are zero. Keep the cost in mind: you need several runs. A simple alternative: pick the single best attempt and hand it to the agent. It works almost as well and is cheaper, but you need a judge who knows which attempt is better.

Mini recipe

1. Run the agent 3-4 times on one task. For a simple one, two are enough. Save the full logs: reasoning, commands, final files. 2. Merge the logs into one block. Each attempt separately, steps in order, outcome at the end. Trim anything long. Don’t add “worked/didn’t work” labels. 3. Open a new coach session and paste the template: coach for an agent, your task, logs in ... tags. 4. Set the guide requirements: self-contained, an ordered plan, exact paths and commands next to each step, traps next to the steps, a candidate answer and a way to verify it. 5. Tell the coach about the reset: which files and settings are gone. The new agent will redo every operation. 6. Run the agent in a clean session: the task plus the guide. Have it check every step against reality. 7. Want it cheaper? Ask for “explanation + answer” instead of a plan. In the measurements, success swung both ways, so test it on your own task.

Examples

[BAD]: `That didn’t work, try again and be more careful` (the agent starts blind and steps on the same rakes) [BAD]: `Give me advice on the best way to export stock levels from Zoho Inventory to a Google Sheet` (advice “off the top of its head” is no better than a run with no advice) [GOOD]: `You are a coach for an agent. You’re given the logs of four attempts at one task. Write a guide for a new attempt from scratch. Set up a daily export of stock levels from Zoho Inventory to the Google Sheet “Amazon Stock”. Files and settings were not kept. [log 1] [log 2] [log 3] [log 4] The guide is self-contained. An ordered plan. Exact requests and parameters next to each step. Traps next to the steps: the rate limit, the broken token. Give a ready-made option and a way to verify it. Whether the attempts were correct is unknown: mark what the agent verifies itself.` What you get: one document. It has a plan from API access to writing into the sheet. Inside: the warehouse-filtered request from one attempt, the pagination from another, and the rate-limit warning from a third.

In plain words

LLM agents get stuck on hard tasks not because they’re dumb, but because they charge in blind every single time. They keep stepping on the same rakes, and feeding them a wall of someone else’s error logs is a sure way to clutter the context window with junk. The ReGE method takes a radical approach: instead of fruitless attempts to rescue a botched session, you let the model wreck things several times in a row, then build a perfect manual out of the mess.

It’s like playing a hardcore roguelike in the spirit of Dark Souls. You send four kamikazes into a dark dungeon: one finds the key but trips a wire; the second opens the door but takes an arrow to the head; the third dodges the traps but gets poisoned. Instead of sending a fifth poor soul in at random, the surviving spirit sits down and draws a step-by-step walkthrough map. The new hero enters the game fresh, knowing exactly where to watch their step.

The mechanics of Re-execution Guided by Experience are dead simple: the model coaches itself. First, the agent launches 4 independent runs and fails in its own way each time. Next, a coach model kicks in, strips out the fluff, and compiles the logs into a concentrated guide: exact API requests, paths, the right parameters, and a list of the traps where earlier clones successfully got themselves killed. Then a new agent takes the stage, starting from a clean slate and relying only on that digest.

It was tested on coding and finicky integrations like a “warehouse-to-marketplace” sync, but the principle is universal. The logic fits perfectly with scraping janky websites, working with complex databases, and any systems automation. A single agent will inevitably trip over a hidden rate limit or a broken token, but cross-attempt experience turns random snags into clear road signs.

Bottom line: stop hoping a model will hand you a working pipeline on the first try, because miracles don’t happen. Give the agent a legitimate right to fail, gather the rakes into a pile, and restart the process in a clean context. Anyone trying to cure hallucinations by kicking the model inside one long session is just burning tokens. The future belongs to experience synthesis, where past failures practically guarantee the final result.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on ReGE: synthesizing an agent’s past attempts into one guide for a clean restart arXiv:2610.33861

Sign in to apply this study New accounts get 50 free credits.