Apply to my task
arXiv:2610.27406 ★ 83 Oct 19, 2026

Anti-Persistence: Keep the Agent's Raw Records, Rebuild Conclusions and Rules for Each Task, Then Throw Them Away

Key result

The paradox: an agent whose memory holds ready-made rules often performs worse than an agent with nothing but raw records. The Anti-Persistence method lets an agent accumulate experience without locking its mistakes in as "lessons". Store only records: task, actions, outcome. Rebuild the conclusion for each task and throw it away. A wrong rule can no longer multiply: error reproduction is cut off. In experiments, the method won in 7 of 9 task–model pairs and used fewer model calls on average.

01

TL;DR

Anti-Persistence is a memory design for agents. The agent stores only raw records of past runs: what it did, what it got, how it ended. It does not store rules, summaries or "lessons." Before each new task it pulls similar records, assembles a short hint from them on the fly, solves the task with that hint, and then throws the hint away. Which kind of hint to build is picked by a simple switch based on past results: use the records as is, extract action templates, draft a plan, or analyze failures.

The usual practice is different: after a task the agent writes itself a "lesson" and puts it into memory or a rules file. If the lesson is wrong, it lives on. It shapes the agent's actions, the records start showing actions taken under that wrong rule, and when the agent derives new rules from the records, the error is born again. The authors call this error reproduction. Deleting the original rule doesn't help: its "offspring" are already saved. In the experiments, rule-based memory often lost to memory made of records alone. Adding rules on top of records didn't help either.

The method separates accumulating experience from locking in conclusions. Experience piles up as facts; conclusions live for one task. Every conclusion is rebuilt from facts and doesn't inherit anyone else's mistakes. Across the experiments, an agent like this solved more tasks and used fewer model calls on average.

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

STORED PERMANENTLY:
  • record log: task → actions → outcome (success/failure)
  • mode log: which hint mode → how it turned out

FOR EACH NEW TASK:
STEP 1: find similar past tasks in the mode log → pick a mode
        (none / imitation / strategic / corrective)
STEP 2: pull matching records from the log → a set of examples
STEP 3: build a temporary hint according to the mode (or pass the records as is)
STEP 4: solve the task with this hint
STEP 5: THROW the hint AWAY; save the record and the outcome

The four modes: - none — just pass along the retrieved records with no extra processing. - imitation — extract action templates and the conditions for using them from successful records. - strategic — build subgoals and a plan from successful records. - corrective — analyze failed records and spell out what to avoid. A successful record is added for contrast.

In the original this is code: similarity search plus a switch that tries out modes. But the principle "keep the records, throw away the conclusions" works by hand too. It fits no-code automations and setting up agents like Claude Code.

03

Example

Where the method shines: repetitive tasks where every run has a clear outcome (worked / didn't work) and the agent accumulates experience. One-off creative tasks are not a fit.

Task: You run the returns desk at an online electronics store (an Amazon storefront plus your own site). An AI agent handles customer requests. It used to append "rules" to a file after every case, like "always refuse customers whose receipt is older than 14 days." A month later the rule was being applied to warranty cases too, and complaints went up. Now you keep only a log of cases with outcomes, and the agent builds a fresh hint for each case.

Prompt:

<Role>
You are a support agent for an online electronics store. You do NOT rely on
saved rules. You rely only on the log of past cases.
</Role>

<NewCase>
A customer from Denver writes: "Bought headphones 18 days ago, the right one stopped
playing. I have the receipt in my Amazon app. I want a refund, $89.99."
</NewCase>

<RetrievedCases>
Case 1 (outcome: SUCCESS): headphones, 20 days, defect confirmed by video → 
warranty exchange, customer happy.
Case 2 (outcome: FAILURE): speaker, 16 days, refused "14-day window" → 
complaint, escalation, refund via formal claim.
Case 3 (outcome: FAILURE): smartwatch, 19 days, offered a refund instead of 
checking for a defect → lost money on a non-defective item.
Case 4 (outcome: SUCCESS): headphones, 12 days, defect → quick refund.
</RetrievedCases>

<ModeHistory>
corrective on similar cases: 3 times, average result +0.8
imitation on similar cases: 2 times, average result +0.3
none on similar cases: 1 time, result −0.5
</ModeHistory>

<Task>
1. Pick a mode (none / imitation / strategic / corrective) based on ModeHistory.
   Briefly explain your choice. It's worth trying a rarely used mode
   if there is little data on it.
2. Build a TEMPORARY hint for this case only, according to the chosen mode.
   In corrective mode: analyze the failed cases, what exactly went wrong,
   and spell out what to avoid; use the successful case as a contrast.
3. Reply to the customer with the hint in mind.
4. At the end, write: "This hint is temporary and is not saved to memory."
   Only the record gets saved: case → actions → outcome.
</Task>

Result: The model names the chosen mode with a short rationale (most likely corrective, given the history). Then it gives a temporary hint block: what went wrong in cases 2 and 3, and how successful case 1 differs. Next comes a ready reply to the customer and a note that the hint isn't saved. You (or your automation) add only the record of the case and its outcome to the log.

04

Why It Works

Weakness. A conclusion like "always refuse after 14 days" rests on conditions that may not hold in another case. Once the agent saves such a rule, it confirms itself. The agent acts by the rule, and the records reflect those actions. At the next "lessons learned" pass, the same rule is derived from the records. Deleting the original rule isn't enough: the saved records and offspring remain.

The LLM's strength. The model is good at deriving patterns from a few examples right in context, tailored to a specific task. Raw records store what happened and don't pretend to explain it. Any conclusion drawn from them is checked against the current task every time.

How the method exploits this. It separates experience from conclusions. Experience piles up as facts. Conclusions live for one task and die with it, so an error never gets locked in as an object. The authors are upfront about the caveat: some influence remains anyway, because the records keep actions taken under the hint's influence.

Control knobs: - Number of records in context — fewer for simple tasks (cheaper), more for complex ones. - Set of modes — drop strategic if you don't have multi-step plans; keep only corrective if not repeating mistakes matters most. - Contrast — add a successful case to the failed ones: that way the model sees the difference, not just "what not to do." - Penalty for an extra call — in the original, an extra model call lowers a mode's reward. Want faster and cheaper? Nudge the choice toward the none mode. - Recency — in the original, older mode scores carry less weight. If your processes change often, count only recent cases.

05

Prompt Template

<Role>
You are an agent for tasks of type {task_type}. You do NOT rely on saved
rules or conclusions. You rely only on the log of past runs.
</Role>

<NewTask>
{new_task}
</NewTask>

<RetrievedRecords>
{3-5 similar records: task → actions → outcome (SUCCESS/FAILURE)}
</RetrievedRecords>

<ModeHistory>
{for each mode: how many times it was used on similar tasks and how it turned out}
</ModeHistory>

<Modes>
none        — use the records as is, without processing
imitation   — extract action templates and conditions from SUCCESSFUL records
strategic   — build subgoals and a plan from successful records
corrective  — analyze FAILED records, what went wrong; spell out
              what to avoid; use a successful record as a contrast
</Modes>

<Task>
1. Pick a mode based on ModeHistory. Explain the choice in one sentence.
   If there is little data on some mode, you may try it.
2. Build a TEMPORARY hint for this task only, according to the chosen mode.
3. Solve the task with the hint in mind.
4. Output a record for the log: task → actions → outcome.
   Do NOT include the hint in the record.
</Task>

<Rule>
The hint lives only in this run. Do not phrase it as a rule
for the future.
</Rule>

What to fill in: {task_type} — the category (returns, code review, leads). {new_task} — the specific request. {records} — 3–5 similar past cases from your log (a spreadsheet, notes, Notion). {ModeHistory} — a simple "mode / times used / outcome" table. You can keep it by hand.

🚀 Quick start — paste into the chat:

Here is the Anti-Persistence template. Adapt it to my task: [your task]. 
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask which tasks repeat, what "success" and "failure" look like, and where your past cases are stored. It needs these answers so that log records have outcomes and the modes can be compared. It will take the pattern from the template and build a working prompt and log format for your task.

06

Limitations

⚠️ Test environment: the experiments ran on training environments — household tasks in text (ALFWorld), shopping in a simulated store (WebShop), science experiments in a simulator (ScienceWorld). That's not a real business and not your CRM. Transferring this to support, code or sales is a hypothesis, not a result from the paper.

⚠️ Not better everywhere: the method won in seven of nine task–model pairs. In the rest it tied or lost (for example, with one model on one environment, Reflexion, ExpeL or rule-based memory came out ahead). The authors themselves say the best option depends on the conditions.

⚠️ Errors don't vanish completely: raw records store what the agent did, not what was right. If a hint was bad, its trace stays in the record. The method removes direct reuse of an error, not all of its influence.

⚠️ You need an outcome: without a "success/failure" label in the log, the mode switch and corrective mode are useless. If your tasks have no verifiable outcome, the method loses half its power.

⚠️ The full version is code: the real selector computes weights by similarity and recency and tries out modes. By hand you can reproduce the principle (keep records, discard the hint, pick the mode from a table), but not the exact math.

⚠️ Causality isn't proven: "error reproduction" is confirmed as a link between old and new rules, not as a rigorously proven chain. The text of the paper we have cuts off during the ablation analysis, so we didn't see the details of the control experiments.

07

How They Tested It

The team tested the idea on three agent training environments and three open models. Each memory variant was run for 10 rounds of self-learning in three repeats. After each round, memory was frozen and success was measured on held-out tasks the agent never saw during training.

Four memory designs were compared: records only, derived rules only, records plus rules, and Anti-Persistence. Separately, they took four well-known competing agents: ReAct, Reflexion, ExpeL, AutoRefine.

The result was surprising: rules didn't help. On average, Anti-Persistence achieved 59.9% success, records only 53.5%, rules only 49.0%, records plus rules 49.3%. The best competitor, Reflexion, scored 52.9%. In other words, adding rules to records didn't improve the result and often made it worse: in seven of nine cases both rule-based variants lost to plain records. AutoRefine, which cleans up rules, improved the result in only one of six cases.

An important detail: Anti-Persistence turned out to be the cheapest in terms of model calls. The none mode needs no extra call, and with this method the runs themselves sometimes get shorter. The practical takeaway: storing experience is useful, but locking in conclusions drawn from it is risky.

08

Adaptations and Extrapolations

🔧 Technique: audit the rules file → weed out "self-derived" rules

If your agent (Claude Code, Cursor, a custom GPT) appends its own "lessons" to CLAUDE.md or a memory file, check where they came from. This is my adaptation; the paper doesn't include such an audit.

Here is the agent's rules file: {file}
Here are the logs of recent runs: {logs}

For each rule:
1. Is it supported by SEVERAL different cases from the logs?
2. Is it phrased as universal ("always," "never") even though
   it's based on a single case?
3. Did it emerge as a result of actions taken under an earlier
   rule (a loop of "rule → actions → same rule")?

Return a table: rule / source / risk (low, medium, high) /
keep, rewrite or delete.

High-risk rules should be rewritten as conditional ("if X, then Y") or removed and returned to the log as facts.

Extrapolation: failures only + contrast. If you don't want to keep a mode log, you can use corrective alone. Before an important task, give the model 2–3 past failures and 1 success and ask: "Analyze what went wrong and how the success differs, and give warnings for this task only. Don't phrase them as a general rule." This is the cheapest way to get value from the method.

09

Resources

  • Paper: More Memory, Worse Agents: Error Reproduction and Anti-Persistence in LLM Agents
  • Authors: Ruhan Wang (Indiana University), Kishan Panaganti (Tencent HY), Dongruo Zhou (Indiana University)
  • Approaches and environments mentioned: ReAct, Reflexion, ExpeL, AutoRefine; ALFWorld, WebShop, ScienceWorld
  • Models in the experiments: Llama-4-Scout, Qwen3-Coder-Next, Gemma-4-31B-it

Research digest

Key result

The paradox: an agent whose memory holds ready-made rules often performs worse than an agent with nothing but raw records. The Anti-Persistence method lets an agent accumulate experience without locking its mistakes in as "lessons". Store only records: task, actions, outcome. Rebuild the conclusion for each task and throw it away. A wrong rule can no longer multiply: error reproduction is cut off. In experiments, the method won in 7 of 9 task–model pairs and used fewer model calls on average.

Principle

Every run follows the same chain. 1. Find similar past tasks. 2. Pick a hint mode from the table of past results. 3. Assemble a short hint from the records. 4. Solve the task with it. 5. Throw away the hint; save the record and the outcome. There are four modes: - as is — pass the records along without processing; - imitation — extract action templates from successful records; - strategy — build subgoals and a plan from successful records; - failure analysis — figure out what went wrong and use a successful record for contrast. Records live a long time; a hint lives for exactly one task. The mode is picked by a simple table: whatever worked on similar tasks is what we use. A rare mode is tried now and then so data builds up for it. Picture a detective. The files from every case sit in the archive. They build a fresh theory for each new case and don't drag old hunches along.

Why it works

The usual setup creates a loop. The agent writes down a wrong "lesson" and acts on it. Those actions show up in the records. The same lesson gets derived from the records. The error is born again. The kicker: deleting the original rule isn't enough. Its "offspring" are already sitting in the records. LLMs are good at finding patterns in a few examples right in context. A conclusion built for a specific task is tested on that task and doesn't drag in someone else's conditions. A raw record doesn't argue or explain. It just says what happened. To be fair: the error's trace doesn't vanish completely. Actions taken under a bad hint stay in the records. And all of this was tested in training simulators: household tasks in text, shopping in a simulated store, science experiments. The result on your CRM or your code remains a hypothesis.

When to apply

Repetitive tasks with a clear outcome (worked or didn't) → support, returns, code review, lead qualification, especially when the agent writes its own rules and starts behaving strangely over time. NOT a fit for one-off creative tasks. Without a "success/failure" label in the log, mode selection and failure analysis are useless.

Mini recipe

1. Set up a log: a spreadsheet or notes. One row: task → actions → outcome (SUCCESS or FAILURE). 2. Kick out the rules: remove files with "lessons" and summaries from the agent's memory. Keep only the records. 3. Keep a mode table: mode / times used / outcome. Doing it by hand is enough. 4. Before a task: pull 3-5 similar records. Fewer is fine for simple tasks; use more for complex ones. 5. Let the agent pick the mode: from the table, with a short reason. If a mode has barely been tried, let it take a chance on it. 6. Build the hint: temporary, for this task only. For failure analysis, add one successful record for contrast. 7. After the task: throw away the hint. Write only the actions and outcome to the log. 8. Want it cheaper: nudge the choice toward the "as is" mode. If processes change often, count only recent cases.

Examples

[BAD]: `Analyze the last 20 requests, derive rules and append them to the instructions file for the future` [GOOD]: `You do NOT rely on saved rules, only on the case log. New case: headphones, 18 days, right one not playing, has receipt. Similar cases: 1) headphones, 20 days, defect confirmed by video, warranty exchange, SUCCESS. 2) speaker, 16 days, refused "14-day window," complaint, FAILURE. 3) smartwatch, 19 days, refunded without checking for a defect, FAILURE. Mode history: failure analysis 3 times, average result +0.8; imitation 2 times, +0.3; as is 1 time, −0.5. Pick a mode and explain in one sentence. Build a temporary hint for this case only and reply to the customer. At the end, output a record for the log: case → actions → outcome. Don't include the hint in the record.` The difference: in the first case the agent writes a rule, and it lives for months. In the second, the rule "refuse after 14 days" never appears. Each time, the agent sees fresh that a warranty defect on day 18 was successfully resolved with an exchange.

In plain words

The smarter an agent tries to look, the faster its own memory makes it dumber. The classic approach is to make the LLM draw "lessons for the future" and save them as rules. The model produces a flawed conclusion, starts following it, and turns a random glitch into law. You get a self-confirming bug: the agent made a mistake, saved a "lesson," repeated the screwup and became fully convinced it was right. The paradox is simple: more memory, worse results.

It's like getting food poisoning once from sketchy gas-station sushi and writing into your rules for life: "never eat fish again, ever." You go hungry, you're proud of your "experience," and your health goes down the drain. Instead of judging the specific situation, you blindly obey your own dogma, invented out of thin air. And the longer you live like that, the more certain you are that you're doing exactly the right thing.

The way out of this dead end is the Anti-Persistence architecture. The agent stores no abstract rules, generalizations or "life wisdom" at all. Only raw logs go into the database: what it did, what it got, whether it worked. Before a new task, the agent pulls similar precedents, assembles a one-time hint on the fly, delivers a solution and immediately throws the hint away. The hint format is chosen by a dead-simple switch based on past results: analyze past failures, draft a plan, or take the actions as is.

This approach is perfect for routine work: support, parsing, closing tickets — anywhere there's a clear binary result along the lines of "nailed it or blew it." For one-off creative work it misses the mark, but over the long run in repetitive processes the method blows standard memory out of the water. The model stops stewing in its own hallucinations because it relies solely on facts about past actions, not its fantasies about them.

The paper's main takeaway: stop making agents "learn from mistakes" through summaries and cheat sheets. Don't save rules — save clean logs. Build context for the task, do the work, burn the draft. Otherwise your agent turns into a confident fool who methodically blows your budget following its own broken instructions.

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 Anti-Persistence: Keep the Agent's Raw Records, Rebuild Conclusions and Rules for Each Task, Then Throw Them Away arXiv:2610.27406

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