Jiarong Liang1 · Yubo Wang1 · Zijie Liu2 · Yuxuan Zhang3 · Ping Nie1 · Wenhu Chen1
1University of Waterloo · 2University of North Carolina at Chapel Hill · 3University of British Columbia
🌐 Homepage | 📄 Paper | 𝕏 X | 💼 LinkedIn
- [2026-10] 🔥 Our paper is on arXiv. The homepage and the code for reproducing the paper are released.
Repeated attempts at an interactive task uncover facts, working operations and failures that a single run can miss. ReGE (Re-execution Guided by Experience) turns these recorded attempts into guidance for a fresh attempt by the same model, so a lower-priced model guided by its own attempts can match higher-priced models.
- Joint synthesis in one call. ReGE-Syn gives a coach the bounded execution records and final artifacts of all recorded attempts together and asks for one self-contained plan in execution order, with the exact paths, values, commands and pitfalls placed at the steps where they matter. Correctness labels are withheld from the coach.
- A fresh execution. The student starts from the task's initial environment state. Files and state from the earlier attempts do not carry over, so it follows, adjusts or skips the proposed operations against what it observes.
- One base model. Source attempts, synthesis and execution use the same model, with no parameter updates and no stronger teacher. The second implementation, ReGE-Sel, forwards one judge-selected trajectory as the guidance.
We evaluate on Terminal-Bench 2.0, Spider2-Lite, AndroidWorld and BrowseComp-Plus. Each task has a pool of four source attempts; ReGE and AggAgent share these pools, and each gets one fresh student execution under the same benchmark-specific step limit.
- Higher task success. Across the four benchmarks, ReGE improves mean task success over unguided execution by 9.9 percentage points with GPT and 8.8 with Claude.
- A lower-priced model matches higher-priced ones. On a 468-task subset,
gpt-5.6-lunawith ReGE reaches 67.4% average success, against 67.0% forgpt-5.6-soland 63.9% forgpt-5.6-terra, at 28% and 58% of their cost per task including source-pool generation. The newer, lower-pricedgpt-6-lunacosts less but reaches 49.4%. - Cheap guidance. On matched BrowseComp-Plus queries, ReGE-Syn spends 98.2% (GPT) and 95.5% (Claude) fewer guidance-construction tokens than adapted AggAgent, and 15.7% and 35.4% fewer tokens for construction and execution combined (input plus output, excluding source generation).
With ReGE, gpt-5.6-luna matches gpt-5.6-sol at 28% of its cost. Average task success
over the 468 tasks of Table 5 against list-price cost per task; the cost of ReGE includes generating the source
pool.
Table 2. Task success and source-inclusive token costs across four benchmarks.
| Benchmark | Task success (%) | Cost (× Control) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Control | SC | Best-of-N | Reflexion | AggAgent | ReGE (ours) | Control | SC | Best-of-N | Reflexion | AggAgent | ReGE (ours) | |
gpt-5.6-luna | ||||||||||||
| Terminal-Bench 2.0 | 41.6 | — | 54.0 | 46.1 | 46.1 | 56.2 | 1.00 | — | 4.17 | 2.71 | 5.83 | 5.25 |
| Spider2-Lite | 59.3 | 64.4 | 63.7 | 64.4 | 55.6 | 66.7 | 1.00 | 4.00 | 4.32 | 1.50 | 11.71 | 5.36 |
| AndroidWorld | 53.8 | — | 57.9 | 55.3 | 51.5 | 58.8 | 1.00 | — | 4.02 | 2.30 | 4.92 | 5.06 |
| BrowseComp-Plus | 64.1 | 74.0 | 74.0 | 73.3 | 76.1 | 76.6 | 1.00 | 4.00 | 4.01 | 2.09 | 4.74 | 4.52 |
| Average | 54.7 | — | 62.4 | 59.8 | 57.3 | 64.6 | 1.00 | — | 4.13 | 2.15 | 6.80 | 5.05 |
claude-sonnet-5 | ||||||||||||
| Terminal-Bench 2.0 | 40.4 | — | 38.2 | 48.3 | 46.1 | 50.6 | 1.00 | — | 4.06 | 2.62 | 6.67 | 5.26 |
| Spider2-Lite | 57.8 | 60.0 | 61.5 | 59.3 | 60.7 | 63.7 | 1.00 | 4.00 | 4.16 | 1.48 | 8.75 | 5.04 |
| AndroidWorld | 61.4 | — | 64.9 | 61.4 | 65.8 | 67.5 | 1.00 | — | 4.01 | 2.07 | 5.09 | 5.02 |
| BrowseComp-Plus | 74.3 | 84.6 | 84.7 | 84.5 | 86.3 | 87.5 | 1.00 | 4.00 | 4.02 | 2.14 | 4.72 | 4.39 |
| Average | 58.5 | — | 62.3 | 63.4 | 64.7 | 67.3 | 1.00 | — | 4.06 | 2.08 | 6.31 | 4.93 |
Task success in %. Cost combines source-generation tokens with measured construction and execution tokens, relative to Control (×). Bold and underline mark the best and second-best success in each row. SC (Self-Consistency) votes over the source outputs and Best-of-N reports the original grade of the judge-selected source; neither re-executes. Reflexion allows up to three executions with label-free self-evaluation. AggAgent's final response is adapted into guidance for a fresh student. — marks unavailable or inapplicable entries.
Table 5. With ReGE, gpt-5.6-luna matches gpt-5.6-terra and gpt-5.6-sol at lower cost.
| Benchmark (tasks) | Task success (%) | Cost per task (USD) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| gpt-5.6-luna | gpt-5.6-luna + ReGE | gpt-5.6-terra | gpt-5.6-sol | gpt-6-luna | ReGE incl. pool | ReGE existing pool | gpt-5.6-terra | gpt-5.6-sol | gpt-6-luna | |
| Terminal-Bench 2.0 (44) | 40.9 | 63.6 | 59.1 | 68.2 | 34.1 | 0.187 | 0.028 | 0.251 | 0.601 | 0.005 |
| Spider2-Lite (68) | 66.2 | 77.9 | 66.2 | 63.2 | 66.2 | 0.043 | 0.007 | 0.044 | 0.090 | 0.001 |
| AndroidWorld (56) | 50.0 | 48.2 | 55.4 | 57.1 | 44.6 | 0.313 | 0.062 | 0.568 | 1.138 | 0.025 |
| BrowseComp-Plus (300) | 70.0 | 80.0 | 75.0 | 79.3 | 52.7 | 0.314 | 0.038 | 0.615 | 1.237 | 0.004 |
| Average | 56.8 | 67.4 | 63.9 | 67.0 | 49.4 | 0.214 | 0.034 | 0.370 | 0.766 | 0.009 |
The 468 tasks are the first half of Terminal-Bench 2.0, Spider2-Lite and AndroidWorld by task ID (AndroidWorld
templates with their first parameterization) and the 300 BrowseComp-Plus queries of the ablations, paired by task
with the gpt-5.6-luna results of Table 2. The other models run once per task without guidance, with the prompts,
tools, step limits and graders of the gpt-5.6-luna Control runs and the serving default (medium) reasoning effort.
The cost of ReGE is shown including source-pool generation and
with an existing source pool. Costs use list prices in USD per million input and output tokens: 0.20 and 1.20 for
gpt-5.6-luna, 2.00 and 12.00 for gpt-5.6-terra, 4.00 and 20.00 for gpt-5.6-sol, and 0.10 and 0.50 for
gpt-6-luna. Bold and underline mark the best and second-best value in each row and block.
git clone https://github.com/TIGER-AI-Lab/ReGE.git && cd ReGE
pip install -r requirements.txtThe code is a set of scripts run from the repository root with Python 3.11 or newer. Terminal-Bench 2.0 needs Docker, and AndroidWorld runs in its own Python environment.
All model calls go through OpenAI-compatible chat completions, and every request to Claude disables extended
thinking. Keys are read from the environment or from a .env file at the repository root (NAME=value lines).
| Variables | Model | Default endpoint |
|---|---|---|
OPENAI_API_KEY, GPT_BASE_URL |
gpt-5.6-luna (GPT line) |
https://api.openai.com/v1 |
ANTHROPIC_API_KEY, CLAUDE_SONNET5B_BASE |
claude-sonnet-5 (Claude line) |
https://api.anthropic.com/v1 |
DEEPSEEK_API_KEY |
DeepSeek-V4-Flash (deepseek-v4-flash), the BrowseComp-Plus equivalence judge, with reasoning disabled |
https://api.deepseek.com/v1 |
LOCAL_API_KEY |
any other endpoint set through the two base-URL variables, e.g. a local gateway |
| Component | Location | Source |
|---|---|---|
| Terminal-Bench 2.0 | data/tb2_dataset/terminal-bench/ |
pip install harbor && harbor download terminal-bench@2.0 -o data/tb2_dataset; Docker pulls each task image on first use |
| Spider2-Lite | third_party/Spider2 (or SPIDER2_LITE_DIR pointing at spider2-lite/) |
xlang-ai/Spider2 at cafb867, with the local SQLite databases unpacked into spider2-lite/resource/databases/spider2-localdb/ as its README describes |
| AndroidWorld | Python environment at ANDROID_WORLD_PYTHON |
google-research/android_world at 3e50888, installed in that environment |
| BrowseComp-Plus | data/bcp/ |
|
| AggAgent | third_party/AggAgent (or AGGAGENT_REPO) |
princeton-pli/AggAgent at 9638f7d, used unmodified |
Install android_world in a Python 3.11 environment as its README describes, together with the openai package, and
point ANDROID_WORLD_PYTHON at that interpreter. Create the AndroidWorldAvd emulator (Pixel 6, API 33) and run
android_world's one-time app setup on it. scripts/run_androidworld.sh drives LANES booted emulators (default 6),
each with its own copy of the AVD; lane i uses console port 5554 + 2i and gRPC port 8554 + 2i, e.g. for lane 0:
~/Android/sdk/emulator/emulator -avd AndroidWorldAvd -no-window -no-audio -no-snapshot \
-gpu swiftshader_indirect -port 5554 -grpc 8554Some task checks need SQLite with FTS4. If the environment's sqlite3 lacks it, install pysqlite3-binary and alias
it as sqlite3 in a sitecustomize.py. The two VLC templates, which crash the emulator, are excluded.
The queries of Tevatron/browsecomp-plus are released
encrypted; decrypt them as described in the official repository.
Together with the documents of
Tevatron/browsecomp-plus-corpus, data/bcp/ holds:
| File | Content |
|---|---|
queries.jsonl |
one decrypted query per line with query_id, query, answer, gold_docids and evidence_docids |
corpus.db |
SQLite table docs with the columns docid and text (as released), one row per document (100,195) |
dense/corpus_emb.npy |
Qwen3-Embedding-8B embeddings of the documents, 100,195 × 4,096, L2-normalised, embedded without an instruction |
dense/docids.json |
the docid of each embedding row |
Search embeds the query with Qwen3-Embedding-8B, served by vLLM at BCP_EMB_URL (default http://127.0.0.1:8910/v1):
vllm serve Qwen/Qwen3-Embedding-8B --runner pooling --port 8910 --max-model-len 8192Each benchmark has one pipeline script. It takes the model line (gpt for gpt-5.6-luna, claude for
claude-sonnet-5) and optionally the stages to run, and runs every stage in order when none is named. Run records
go to data/, task lists, judge picks, guidance and grades to result/, and logs to logs/.
scripts/run_tb2.sh gpt # Terminal-Bench 2.0, every stage
scripts/run_spider.sh gpt # Spider2-Lite
scripts/run_androidworld.sh gpt # AndroidWorld
scripts/run_bcp.sh gpt # BrowseComp-Plus
scripts/run_tb2.sh claude judge guides # only the named stages
python scripts/summarize.py # task success per benchmark and model line -> result/summary.jsonRepository layout
src/ collectors, guidance construction and graders
guidance_moa_experiment.py ReGE-Syn coach prompt, ReGE-Sel guidance, the guidance forms of the ablations and the
delivery headers
aggregate_deliverable.py source-pool loading, source rendering and the coach call
judge_sweep.py ReGE-Sel judge (its picks also give Best-of-N)
guides_build.py guidance for every task of a source pool (BrowseComp-Plus)
aggagent_arm.py AggAgent adapter (fresh-student guidance from its final response)
tb2_collect.py Terminal-Bench 2.0 agent loop and official verifier, with shell helpers from tb_collect.py;
tb2_guides.py builds its guidance
spider_collect.py Spider2-Lite agent loop and official result comparison (spider_eval_bridge.py);
spider_guides_s5.py converts the source pool and builds guidance
droid_collect.py AndroidWorld T3A agent and state-based grading; droid_guides_dsE.py converts the source
pool and builds guidance
bcp_collect.py BrowseComp-Plus search, document and submit tools, and grading
stitch_validate.py model registry and API keys
door_probe.py request settings that disable Claude's extended thinking
scripts/ the four pipelines, task lists, merging of parallel builds and the accuracy summary
configs/ BrowseComp-Plus query order (830 queries)
homepage/ project page, published to GitHub Pages by .github/workflows/pages.yml
If you find ReGE useful, please cite our paper:
@article{rege2026,
title = {ReGE: Stronger Agents through Experience Synthesis},
author = {Liang, Jiarong and Wang, Yubo and Liu, Zijie and Zhang, Yuxuan and Nie, Ping and Chen, Wenhu},
journal = {arXiv preprint arXiv:2610.33861},
year = {2026}
}The code is released under the MIT License.
