pip install -U numpy silently changes 27 packages; 100+ actions later the old environment is gone. With BackUpper, the same call is caught, the environment is backed up first, and it restores in one step.Coding agents modify real-world state, such as software environments, databases, and files, and users often regret the loss later, when they find they still need it.
RegretBench grounds 205 tasks in real-world regret moments and tests whether coding agents back up, how often, and whether it covers what humans later need.
BackUpper is a plug-in that backs up affected state before every tool call, covering every regret-moment action at $0.014 per task.
Each task is built from a real-world regret moment, reported on platforms such as X.com, GitHub, and Stack Overflow, where a user explicitly reported losing state they later needed and regretted not backing it up. We pair it with a real environment and a real multi-turn conversation to build an executable task. We then measure three things: whether the agent completes the task (Pass Rate), whether it backs up before the regret moment (RMBR), and how often it backs up anything outside the workspace (OWBR). Since harnesses already snapshot the workspace, we only count backups beyond it.
Pass rate, out-of-workspace backup rate (OWBR) and regret-moment backup rate (RMBR) on all 205 tasks.
Stronger models don't back up more
GPT 5.4 โ 5.6-Sol in Codex, 60-task subset.
It's the model, not the harness
RMBR of three models in three harnesses, 60-task subset.
Because it is hard to predict which changes will be regretted, BackUpper checks every tool call on the harness's pre-tool-call hook, before it runs. Read-only calls pass straight through. Common operations get a rule-based backup: rewriting the command (rm โ move to trash), pairing it with a backup (pip freeze before pip install), or snapshotting workspace edits. Complex or ambiguous cases go to an LLM checker and a lightweight subagent that inspects the call and backs up what it will change. Users can customize what gets backed up in plain words, and every backup is logged with a command to restore it. We measure backup coverage (RMBR, OWBR) and how close the restored state is to the original (state similarity).
205 tasks, six models. Post-hoc Recovery restores after the fact, so it has similarity only.
* vs. Skill-Based (main agent backing up by itself).
Restored state, by tool
Similarity to the original state, without and with restoring.
Backs up only what you care about
Backup-trigger F1 under three personalized modes.
Doesn't hurt task success
Task pass rate on 40 external tasks, without and with BackUpper.
Where backups come from
Share of backup triggers by tier on Terminal tasks, averaged over six models.
Install BackUpper once and keep using your agent as usual. Every tool call is checked before it runs, and the state it touches is backed up first.
Common operations are handled by rules at no model cost; complex or ambiguous cases go to a lightweight subagent. Every backup is logged with a way to restore it.
$ npm install -g agents-backupper $ backupper init $ backupper install claude-code # or: codex | hermes | openhands # deepseek-harness | openclaw # use your agent as usual, then see what was backed up $ backupper list # undo when you regret $ backupper restore 3
@article{li2026regretmeasuringbackupawareness,
title = {Back Up Before You Regret: Measuring Backup Awareness and Automating Backup in Coding Agents},
author = {Xu Li and Simon Yu and Minzhou Pan and Yiyou Sun and Zhaorun Chen and Bo Li and Weiyan Shi},
journal = {arXiv preprint arXiv:2610.28934},
year = {2026}
}