Memory That Questions Itself: How WikiTrace Reduces Memory Backfires in LLM Agents

WikiTrace links lessons from past experience to their original records, letting agents check the evidence when something seems questionable. This reduced cases where memory made agents perform worse.
← All posts
온
온틀 리서치
2026년 11월 12일 Updated 2026.11.21 40 min read views 9

Giving an LLM agent memories that summarize past experience sounds like it should improve performance. In practice, memory can cause an agent to fail at problems it could solve without it. WikiTrace, from researchers at KAIST and DeepAuto.ai, tackles this problem directly. The idea is simple: instead of handing over isolated lessons, link them to the original execution records they came from, and let the agent inspect those records whenever a lesson seems questionable before acting on it. Across five benchmarks and eight sets, WikiTrace improved average performance by 10.7 points over an agent without memory (79.5 → 90.2, using deepseek-v4-flash). It also scored 3.2 points higher than a condition that provided the same lessons but blocked access to the original records.

The Problem This Paper Addresses

External memory for agents works like this: trajectories from past tasks—sequences of actions and observations—are compressed into short lessons, which the agent retrieves when tackling a new task. It is a reasonable design. The agent does not have to work everything out from scratch and can follow procedures tailored to its environment. These lessons can take many forms: verbal reflections, executable skills, manuals, workflows, or reasoning strategies.

The trouble is that memory does not always help. The paper calls this “memory-induced degradation”: giving an agent memory causes it to fail at a task it would otherwise have solved. That makes average accuracy alone insufficient. Even when the average rises, it does not tell you separately how many previously failed tasks became successes and how many previously successful tasks became failures. The authors measure both. Gain is the rate at which memory turns failure into success; Regression is the rate at which it turns success into failure. They point out that existing memory methods have Regression rates comparable to, or even higher than, simply rerunning the agent without memory.

Why does this happen? The authors analyzed tasks that the agent solved in all three runs without memory but failed when given memory. They used an LLM judge (gpt-5.6-sol, medium reasoning) to compare failed runs with runs without memory, identify the first point of divergence, and classify the causes into five categories. They traced 52% of these failures to memory entries the agent had followed. The most common cause was an incorrect entry (20%). The remaining memory-related causes involved applying a valid entry outside its intended scope (B), using it incorrectly (C), or following the wrong entry when a better one was available (D).

The underlying problem is the label. A trajectory receives a single label: success or failure. That label does not tell us which of its many actions caused the outcome. Any method that extracts lessons from trajectories therefore has to infer which actions mattered and under what conditions. Every mistaken inference can produce a lesson that misleads the agent on a new task. Existing approaches also provide the lesson without the trajectory it came from. The original trajectory may contain evidence that exposes a faulty lesson, but the agent has no way to check it.

The Core Idea

WikiTrace keeps lessons connected to their sources. Think of it as stapling a sticky note to the relevant timestamp in the original meeting transcript, rather than peeling it off and handing it to someone. A lesson concisely says what to do but leaves out why. A trajectory faithfully records what happened but is too long to reread at every decision. To benefit from both, the agent needs to use lessons routinely while being able to drill down into the source when something seems questionable.

Memory is therefore organized into three layers. At the top are insights: concise lesson documents that specify what to do, when it applies, which run it came from, and whether that run succeeded. Below them are compilations, which summarize why each trajectory succeeded or failed. At the bottom are the raw, unprocessed trajectories. Each insight links to its compilation and original trajectory.

The construction process works as follows. A compiler reads the task, trajectory, and binary success signal, then produces one compilation and up to three insights. For successful runs, it records decisions associated with success. For failed runs, it records plausible explanations for failure, using separate templates for success and failure. One design choice matters here: each run is processed independently, and insights are never revised or deleted once written. This gives every insight a clear source, but it also allows duplicates and contradictions to remain in the pool. The agent is responsible for choosing which insight fits the current task. The tradeoff is explicit: instead of resolving conflicts in advance, the authors leave them to be resolved through evidence at test time.

What happens at test time is the heart of the paper. When a new task arrives, the agent first receives all insights. Each specifies what to do, when to do it, and the source run ID. The three past runs most similar to the current task are presented alongside the insights as starting points for exploration. The agent then follows the links downward—a process the paper calls “descending”—if any of three conditions applies: an insight lacks enough detail to act on, conflicts with another insight, or comes from a failed run. It is also instructed to descend after an action fails. The underlying memory is mounted as read-only files, and the agent searches it with terminal tools such as read and bash to find facts that settle the question, such as the correct command syntax. The agent gets to decide whether to trust a summary by checking it against evidence.

How the Experiments Were Designed

The evaluation covered five benchmarks and eight sets. Three are simulated text worlds where agents issue one text command at a time: ALFWorld for household tasks, ScienceWorld for science experiments, and PlanCraft for Minecraft crafting. Two are tool-use environments: AppWorld, where agents perform everyday tasks through application APIs, and τ-bench Retail, where agents call tools while talking to simulated customers about an order database. AppWorld is split into Test-Normal and Test-Challenge, with the latter requiring unfamiliar applications.

The comparison conditions deserve a close look. No Memory is the same agent with nothing added to its prompt. AWM abstracts successful trajectories into reusable workflows. ExpeL maintains a list of free-form rules, reviewing the entire list after each successful trajectory to add, revise, and delete rules. ReasoningBank distills successful and failed trajectories into reasoning strategies and retrieves them by task similarity. The most decisive comparison is Insights Only: it supplies exactly the same insights as WikiTrace but does not mount the underlying compilations and trajectories or include the instruction to descend. WikiTrace and Insights Only therefore differ in one respect: access to the original runs. This design allows the performance difference to be attributed directly to descending.

The protocol also takes care to keep comparisons fair. Each method is run three times on each set. Each builds its memory once from the same No Memory training runs and is then evaluated on the same test tasks. No method can perform additional runs to validate its memory. All methods use the same agent—the Pi terminal agent—with benchmark-specific ReAct instructions. Both the agent and the memory builder use deepseek-v4-flash with high reasoning.

It is also worth being precise about what the metrics capture. Separating Gain from Regression is useful for exposing memory backfires, but both are measured through the final outcome: task success. The failure-cause analysis, including the 52% figure, relies on automated judgments from an LLM and has interpretive limits. The authors acknowledge that causes are often implicit and that behavior varies between runs even without memory.

Results and What They Mean

WikiTrace ranked first on all eight sets, averaging 90.2. That is 10.7 points above No Memory at 79.5 and 3.2 points above Insights Only at 87.0. It was also the only memory method to match or exceed No Memory on every set. Every other memory method produced at least one set where having memory was worse than having none.

The Regression figures support the paper’s central claim. WikiTrace had a Regression rate of 4.5%, below both Insights Only at 6.5% and the rerun-without-memory baseline at 9.7%. It had lower Regression than Insights Only on seven of the eight sets and was the only method whose Regression confidence interval fell entirely below the rerun baseline band. This reduction did not come at the expense of Gain. WikiTrace’s Gain exceeded the rerun baseline by 35 percentage points, compared with 27 percentage points for Insights Only and 7–14 percentage points for existing memory methods. Since WikiTrace and Insights Only differ only in access to the original records, both the higher Gain and lower Regression can be attributed to that access.

The analysis then examines when and why agents descend. They did so more often on harder tasks: in 22% of runs on easy tasks and 44% on hard tasks. Difficulty is defined by how often No Memory solves a task across three runs: no successes means Hard, one or two means Medium, and three means Easy. The advantage over Insights Only was concentrated in descents triggered by trouble. Descents prompted by a blocked attempt, an observation that ruled out a plan, or doubt about an insight accounted for 36% of all descents and beat Insights Only by 10.4 points—far more than the 3.7-point advantage for descents without preceding trouble. The largest gap, 17.3 points, appeared when a blocked attempt sent the agent looking for a specific fact in a past run. Insights Only had no way to look up that fact. The finding that runs performed better when the inspected record changed the plan—43% of all descents—points in the same direction.

Another interesting question is whether agents can learn from failure. On PlanCraft and ScienceWorld, the authors compared memories built from successful runs only, failed runs only, and both. For both methods, failed runs alone outperformed successful runs alone, and using both worked best. However, Insights Only had its highest Regression when using failed runs alone: 9.3% on PlanCraft and 9.4% on ScienceWorld. WikiTrace, using the same insights, reduced those figures to 7.1% and 8.9%. Failed runs contain useful information, but access to the original evidence is needed to keep mistaken interpretations in check.

What about cost? WikiTrace retained the highest average performance even when existing methods received larger construction budgets: 9 times the budget for AWM and 3 times for ExpeL and ReasoningBank. At test time, it cost 1.17 times as much per task as Insights Only, in exchange for an average gain of 3.2 points. The authors also checked generalization. When they reevaluated only PlanCraft and ScienceWorld using a different backbone, GLM-5.3-flash with medium reasoning, WikiTrace averaged 92.7, beating Insights Only by 1.8 points and No Memory by 21.5 points. Every existing memory method fell below No Memory on at least one set. This three-set average of 92.7 should not be confused with the main table’s eight-set average of 90.2; they cover different sets.

Limitations and Open Questions

Start with the limitations the authors acknowledge. Because insights are never revised or deleted, duplicates and contradictions can remain in the memory pool, leaving the test-time agent to choose between them. The agent also decides for itself whether to descend, so runs with and without descents may differ in many other ways. Even runs without descents outperformed Insights Only. This suggests that WikiTrace’s more selective use of memory also contributes, making it difficult to isolate the effect of descending alone. Figures such as the 52% attribution of failure causes also depend on an LLM judge’s interpretation.

The question that remains for me is scale. Keeping every insight helps preserve provenance, but as past runs grow into the thousands or tens of thousands, both the insight pool and the number of records available to inspect will grow. The excerpt does not establish whether the reported 1.17-times test cost would hold at that scale. The evaluation also used two backbones, deepseek-v4-flash and GLM-5.3-flash, on simulation and tool-use benchmarks. Whether findings from controlled environments with trustworthy source trajectories carry over to noisy production logs is a separate question.

How It Compares with Other Approaches

WikiTrace’s position becomes clearer when set against two broad directions in this field. One focuses on better distillation, selection, and updating of experience. AWM’s workflow abstraction, ExpeL’s rule-list management, and ReasoningBank’s reasoning strategies fall into this group. Related work also explores validating memories before storage (PREPING), admitting only skills that pass held-out evaluation (SkillOpt), and updating or deleting memories based on subsequent utility (ReMe). These methods ask which experiences to keep. WikiTrace asks whether a retained lesson is justified at the moment it is applied, returning to the original record during execution to check.

The other direction concerns memory structure and access. Approaches include organizing memory hierarchically for compression, planning, and retrieval; linking filesystem summaries to original interaction records (HORMA); and actively deciding when and what to retrieve during reasoning. Direct Corpus Interaction (DCI), in particular, provides a general framework for accessing a corpus through terminal tools. WikiTrace brings these two concerns together around reexamining procedural lessons. Its structure preserves the connection between a lesson and its source run, while its access mechanism lets the agent inspect that run when deciding how to apply the lesson. The study’s distinctive contribution is giving existing lesson-based memory a way to return to its sources and challenge what it says, more than proposing a new memory format.

ONTLE’s Perspective

Consider a concrete part of an AI PM’s work. If ONTLE works across multiple project assignments, lessons from past projects will naturally accumulate. Suppose a lesson extracted from one project enters memory as “Avoid Friday deployments for this client.” On the next project, an AI PM carrying only that lesson might treat it as a general rule and postpone an otherwise sound schedule every Friday. Yet the original record described a one-off incident: a particular release had no staff available to respond to problems on Friday night. This is precisely the memory backfire described in the paper. An incomplete lesson undermines a decision the agent might have made correctly without memory.

A WikiTrace-style approach changes that scenario. The lesson carries its source project ID. Before applying it, the AI PM checks the original retrospective or execution log if the lesson lacks detail, conflicts with another lesson, or comes from a failed project. If the record shows that “avoid Fridays” was a response to an incident under specific conditions, the agent will not apply it wholesale to the current client. More importantly, lessons from failed projects do not have to be discarded. Failure records contain useful information, but their interpretation is prone to error, so the original record stays close at hand for review just before application. A typical moment when trust breaks down in an AI PM product is when it cannot substantiate its answer to “Why did you make that decision?” Linking lessons to their sources builds that accountability into the design.

A Checklist for Practitioners

  • After adding memory, measure the rate at which success turns into failure (Regression) separately from average accuracy. The average can rise while previously working cases start to fail. Comparison with a rerun-without-memory baseline is especially useful.
  • Store links to both the original run and a summary of why it succeeded or failed alongside each lesson. WikiTrace’s 3.2-point gain came from adding source access to the same lessons.
  • Specify the conditions and tools that let an agent inspect the source when something seems questionable. This paper uses insufficient detail, conflicts, lessons from failed runs, and action failures as triggers, with read/bash to search read-only files. Most of the benefit came from checking after trouble arose.
  • Keep failed runs, but always preserve their lessons together with source evidence. Lessons from failures produced the highest Regression when provided alone—reaching the 9% range—but attaching the original records reduced it.
  • Before continually merging and revising lessons, consider preserving their sources and resolving conflicts at test time. The tradeoff is accepting duplicates and contradictions in exchange for traceability.
  • Measure the additional cost in advance. In this paper’s setting, source access bought 3.2 points at roughly 1.17 times the cost per task. You will need to check whether that ratio holds at your scale and with your backbone.
Does WikiTrace make memory construction smarter?

No. Its focus is on returning to the original run to review an existing lesson at the moment of application, rather than improving how lessons are distilled or selected. During construction, insights are extracted independently from each run and are never revised or deleted.

Won’t contradictory lessons accumulate if insights are never revised or deleted?

Yes. The paper explicitly states that duplicates and conflicting insights can remain in the pool. It leaves the test-time agent to decide which applies and, when a conflict is detected, inspect the source runs for both insights to resolve it through evidence. One example is a PlanCraft case where checking the source corrected an erroneous insight and led to success.

Isn’t inspecting the original records every time slow and expensive?

The agent does not inspect them every time. It descends only when details are missing, insights conflict, a lesson comes from a failed run, or an action fails. As a result, it descended in only 22% of runs on easy tasks and 44% on hard tasks, with test-time costs roughly 1.17 times those of using the same lessons alone.

Does it work with other models?

The main experiments used deepseek-v4-flash. In a separate evaluation using GLM-5.3-flash on PlanCraft and ScienceWorld only, WikiTrace also ranked first, averaging 92.7: +1.8 over Insights Only and +21.5 over No Memory. Keep in mind that this three-set average covers a different collection from the main table’s eight-set average of 90.2.

Can it be applied directly to production logs?

The excerpt does not provide enough evidence to say. Evaluation took place on controlled simulation and tool-use benchmarks, with an underlying assumption that the original trajectories were trustworthy. Whether the cost and benefits hold for noisy production logs or tens of thousands of records requires direct validation.

References