Preprint
Article

This version is not peer-reviewed.

Stale States in Agent Memory: Real Project Memories and a Test of a State Record

Submitted:

01 December 2026

Posted:

03 December 2026

You are already at the latest version

Abstract
Software assistants that write code keep notes between working sessions: instructions written for them, and logs of what was done. These notes are their memory of a project. Recent work has shown, on test data built for the purpose, that an assistant which searches such a memory is often given an outdated fact. We ask how often this situation occurs in memories written during real work, and what helps. We collected the memory files of 60 software projects from one developer's computer, 485 files in all, and a language model labeled each of their 30,660 statements. By its labels, about 4% of the statements can be read in two ways. Statements about something that changes, such as a status, a version or a count, are ambiguous 14% of the time, against 1% to 3% for the other kinds. A second, smaller model agrees on the kinds of statement and marks almost none of them as ambiguous, so the size of these rates is uncertain. On the logs of one project, a large model that reads a whole log answers every question correctly. Given only the line returned by a search, it is right 8 times out of 24, and 16 times when the old line carries a short note saying what replaced it. We also tested a memory that the model keeps as a record of current values. In a simulated warehouse where every change is stated, the smaller model answers 86% of the questions correctly from this record, against 25% from a summary. On a public benchmark where changes are only implied, the same record does worse than a summary. The study covers one developer and small tests.
Keywords: 
;  ;  ;  ;  ;  ;  ;  

1. Introduction

A coding assistant is a language model that reads and changes the files of a software project at a developer’s request. It works in sessions. Between two sessions the model keeps nothing by itself. What it knows about the project at the start of a session is what the project’s files tell it. Two kinds of files are written for that purpose.
  • Instruction files. A developer, or the assistant, writes down how the project is built, what must never be done, and which commands to run. Common names are CLAUDE.md and AGENTS.md.
  • Session logs. A tool writes, after each exchange, a few short notes on what was asked and what was done. One file holds the notes of one day.
We call the two together the memory of the project. The assistant reads it in one of two ways. It reads a file in full, or it searches the memory with a few words and receives the lines that match.
A memory is useful if a statement in it has one reading. “The tests pass” has one reading on the day it is written. A week later it has two: the tests passed then, or the tests pass now. We call a statement ambiguous when a careful reader who has the memory and nothing else cannot tell which reading holds.
To sort statements we use four categories, called STAR, that human languages share for describing a world [1]:
  • a Thing is something that exists, with properties that do not change (a file, a tool, a component);
  • a State is something that changes (a status, a version, a count, what has been done so far);
  • an Action is something that is done or was done (a command, a step, an event);
  • a Relationship is a rule that links the others (“never commit without running the tests”).
The paper asks three questions.
  • How much of a real project memory is ambiguous, and in which category?
  • Does preparing the memory, by marking the ambiguous statements, change the answers a model gives?
  • Does a memory kept as a record of the current States, written by the model itself, serve better than a summary?
That an outdated fact misleads a model that searches its memory is known, and so is the remedy of marking such facts when they are written (Section 2). Those results were obtained on memories built for the test, or on facts extracted from code changes. The contributions of this paper concern memories as they are written during work, and the conditions under which a record of States helps.
  • An ambiguity score: the share of the statements of a memory that carry at least one of six marks, given per STAR category (Section 4).
  • The score of 485 real memory files from 60 projects, by the labels of one model (Section 5). Ambiguity is concentrated in States, and half of the marks are States that a later statement replaced. Rules and descriptions of Things are almost free of it. A second model agrees on the categories and not on the marks (Section 4.4).
  • A test on the session logs of one project, under two ways of reading (Section 6). It confirms the known failure on naturally written logs, and adds three observations: the failure is absent when the model reads the whole log; the date of an entry, which helps on templated facts [11], makes the model decline to answer on these logs and does not make it right; and a known device, a pointer from the outdated statement to the one that replaced it, restores most of the right answers when it is written as a note in the text file itself.
  • A test of a record of States on two materials (Section 7). A record of this kind is an established design [5,11,12]. In a simulated warehouse where every change is stated in a sentence, the record serves the smaller model far better than a summary or the whole history, and a computed true state assigns each wrong answer to the writing or to the reading of the record. On a reduced run of the STALE benchmark [5], where a change is implied and never stated, the same record does worse than a summary. The record also has a place for a value whose role the text leaves open, a case we did not find in the work on memory.

3. The Corpus

The corpus is the set of memory files found in the project folders of one developer’s computer. The developer is the author. The projects cover web applications, a point-of-sale system, developer tools, a simulation engine and research code.
Table 1. The corpus.
Table 1. The corpus.
Top-level project folders scanned 165
Folders with at least one memory file 83
Memory files found 1,269
Files with distinct content 487
Files scored 485
Projects after splitting folders that hold several repositories 60
Statements labeled 30,660
Many files are copies: the same instruction template in several projects, and working copies of one repository. Each distinct content is scored once. Two files matched the pattern of a secret key and were left out.
The files are of several kinds. Instruction files are the main instruction file of a project, the smaller instruction files that a development tool keeps per topic, and files that describe a command or a skill. Memory notes are short files in which an assistant records what it learned about a project. Session logs are the dated files described in the introduction.
Sixty-three files belong to projects written by other people, copied into the developer’s folders: well-known open-source repositories. We score them as a separate group, called third-party.
For each session log we also read the marker that the logging tool writes above each entry. The marker names the folder in which the session ran.

4. The Ambiguity Score

4.1. Statements and Marks

A statement is one bullet, one table row or one sentence that says something about the project. Headings, code and blank lines are not statements. Each statement receives one STAR category and zero or more marks. A mark names one way in which the statement can be read in two ways. Table 2 lists them.
The ambiguity score of a memory is the share of its statements that carry at least one mark. We give it for the whole memory and for each STAR category.

4.2. Labeling

A language model labels the statements. It receives one file with its lines numbered, in parts of at most 350 lines, and the definitions above. It returns one line per statement: the line number, the category, and the marks with a reason of at most twelve words. It is told to mark only what a careful new reader could not resolve, and to leave style and missing detail aside.
The model is Claude Opus 5.5 (Anthropic), called the larger model in this paper. It reasons before it answers, and the amount of reasoning is set by a parameter called effort. The whole corpus was labeled at low effort.

4.3. Agreement Between Two Labeling Passes

To measure how much the score depends on the labeler, 20 files of varied kinds were labeled twice, at low and at high effort.
Table 3. Two labeling passes on the same 20 files.
Table 3. Two labeling passes on the same 20 files.
Low effort High effort
Statements found 958 918
Statements with at least one mark 39 (4%) 34 (4%)
Statements found by both passes 910
Same STAR category in both 829 (91%)
Marked by both 18
Marked by at least one 53 (5.8%)
Agreement on marks (Cohen’s κ ) 0.49
The two passes give the same rate, 4%, and agree on the category of nine statements in ten. They agree less on which statements to mark: about half of the statements marked by one pass are marked by the other. For this model the score is therefore stable as a rate, and one pass is a lower bound on the set of ambiguous statements. On these files the union of two passes raises the rate from 4% to about 6%. We report the single-pass rate as the expected case and treat one and a half times that rate as the high case.

4.4. A Second Labeling Model

A second model labeled 115 statements drawn from the corpus. It is Qwen3-30B-A3B-Instruct, an open model of 30 billion parameters run on a local machine, called the smaller model in this paper. The sample was drawn so that half of its statements carry a mark of the first model, in near-equal numbers per category.
Table 4. The two labeling models on the same 115 statements.
Table 4. The two labeling models on the same 115 statements.
Agreement Cohen’s κ
STAR category (four classes) 67% 0.56
Statement carries at least one mark 51% 0.03
Statements marked by the larger model 58
Statements marked by the smaller model 4
Superseded States of the larger model, also marked by the smaller 0 of 10
The two models agree on the category of two statements in three. The largest disagreement is on States: of the 29 statements that the larger model labels as States, the smaller model labels 15 as States and 10 as Actions. A line such as “committed and pushed” can be read as what was done or as where the work stands. On the marks the two models do not agree: the smaller model marks 4 statements where the larger marks 58, and none of its ten superseded States.
The rates of Section 5 are therefore the counts of one model. The second model does not contradict where the marks fall, since it gives almost none. It does not confirm them either. The test of Section 6 is an indirect check of the marks of the first model: questions built from its marked States are answered wrongly from one line, and its tags restore the right answers.

5. Ambiguity in the Corpus

5.1. The Score by STAR Category

Of the 27,907 statements in the developer’s own memories, 1,135 carry at least one mark: 4.1%. Figure 1 and Table 5 give the score by category.
States are 18% of the statements and 60% of the marked ones. A statement about a State is five to fifteen times more likely to be ambiguous than a statement of another category.

5.2. The Marks

Table 6 counts the marks. A statement can carry two.
Almost half of the marks are superseded States. The memory keeps what was true at an earlier moment and adds what is true now, and nothing links the two. The typical cases are a count of passing tests that grows during a day (25, then 30, then 34), a status of work (“mid-build”, then “completed”), and a status of a change (“not yet committed”, then “committed”).

5.3. The Score by Kind of Memory

The two kinds of memory hold different things. In an instruction file, about half of the statements are Relationships and one third are Things. In a session log, 39% are Actions and 28% are States. All the files other than session logs score 2.2% taken together. The rules that a developer gives to an assistant are clear. What the memory says about where the work stands is less so, and it is the logs and the notes that say it.
Table 7. The developer’s own memories by kind. The last column is the score of the States alone.
Table 7. The developer’s own memories by kind. The last column is the score of the States alone.
Kind Statements Score States, share States, score
Memory notes 815 8.8% 12% 23.5% (23 of 98)
Session logs 14,632 5.7% 28% 15.4% (626 of 4,058)
Main instruction files 573 3.5% 5% 21.4% (6 of 28)
Instruction files by topic 7,016 2.1% 11% 2.7% (21 of 764)
Skills, commands and others 4,871 1.2% 2% 9.3% (7 of 75)

5.4. Third-Party Files

The 63 third-party files score 2.0% (56 of 2,753 statements). They are instruction files and contain few States (92 statements). Their score is close to that of the developer’s own instruction files, which suggests that the difference between memories comes from the kind of content more than from the author.

5.5. Log Entries Filed Under Another Project

The marker above each log entry names the folder in which the session ran. Of 1,502 entries with a marker, 184 (12%) sit in the log of one project and were written by a session that ran in the folder of another. The cases are grouped: all the entries of the logs concerned are in this situation. A reader of such a log has no sign, in the text of the entries, that “the repository” or “the tests” are those of another folder.

6. The Effect of Preparation

6.1. The Project and the Questions

The test uses the session logs of one public project, a plugin for a coding assistant. It has the largest number of marks among the public projects of the corpus: 115 in 2,253 statements. Seven of its daily logs are used, of 70 to 301 lines each. The logs are not part of the public repository.
We wrote 41 questions, each about one log.
  • 24 target questions ask for a State that the labeling pass marked. The answer is the latest State in the log. Example: “How many self-tests currently pass?”, in a log that says 30, then 34.
  • 2 unsettled questions ask for something the log never gives. The right answer is to say so. Example: “Which two files?”
  • 15 control questions ask for facts in unmarked statements.
A question was kept only if the log settles its answer.

6.2. The Prepared Memory

The prepared version of a log is made by a program from the marks, with no other input. Each marked statement keeps its text and receives, at its end, a tag: the name of the mark and the reason the labeling pass gave. For example:
Code is built, tested, and validated but not yet committed or pushed to main. [STATE REPLACED LATER: uncommitted here; committed and pushed later in this log]
No statement is removed and no fact is added. Fifty-three statements are tagged in the seven logs. A tool that applies tags of this form to memory files is public [30]. It was written after this test, which used the program described above.

6.3. Two Ways of Reading

Full reading. The model receives the whole log and the question. Three versions of the log are compared: raw; hint, the raw log under a header that says that a later entry replaces an earlier one; and prepared, the header and the tags.
Figure 2. The two ways of reading. In both, the model answers one question per call and knows nothing else about the project.
Figure 2. The two ways of reading. In both, the model answers one question per call and knows nothing else about the project.
Preprints 247623 g002
Search reading. The model receives only the statements that a keyword search returns for the question. The search is BM25, a standard ranking function that scores a statement by the words it shares with the question. It runs over the statements of the log and returns the best 1, 3 or 5. The same statements are returned in all versions, and only their text differs: raw; timed, with the date and time of the entry before each statement; and prepared, with the time and the tag.
Each answer is placed in one of three classes: right; not settled, when the model says that what it sees does not settle the answer; and wrong. Answers were graded by pattern against the expected answer, and every answer graded wrong was then read.
The model is the larger model at low effort. Section 6.6 repeats the search reading with the smaller model.

6.4. Full Reading

The model answers every question correctly in the three versions. With the whole log in front of it, it finds the latest State without help, and often adds when the earlier value held. The ambiguity that the score measures has no effect here.
Table 8. Full reading: right answers.
Table 8. Full reading: right answers.
Questions Raw Hint Prepared
Target (24) 24 24 24
Unsettled (2) 2 2 2
Control (15) 15 15 15

6.5. Search Reading

The search alone, before any model is involved, shows the difficulty (Table 9). For most target questions it returns a superseded State. With one line returned, it returns the current State for 3 questions out of 24, and a superseded State without the current one for 15.
Four observations follow from Figure 3 and Table 10.
With one line, preparation doubles the right answers. They go from 8 to 16 of 24, and the wrong answers from 6 to 3. In the 15 cases where the search returns a superseded State alone, the raw version gives 1 right answer and 6 wrong, and the prepared version 9 right and 3 wrong.
The time of the entry makes the model careful, not right. Dated lines are a common way to present a memory to its reader [4,15]. With the time added, wrong answers fall from 6 to 3 and “not settled” answers rise from 10 to 14. The right answers do not rise. A date tells the model that the line may be old. It does not tell it what replaced the line.
The effect shrinks as more lines are returned. With 5 lines the right answers are 19, 20 and 22. More lines give more chances that the current State is among them.
When the current State is returned, the model is always right. This holds for the 29 cases of Table 9 (3, 12 and 14) in each of the three versions. The difficulty is entirely in the absence of the current State, and the tag is a way to carry it on the superseded line.
The control questions are answered alike in the three versions: 13 of 15 with one line, and 15 of 15 with three or five. The two unsettled questions are answered “not settled” or correctly in every case.

6.6. The Smaller Model

The search reading was repeated with the smaller model (Section 4.4). The questions, the lines returned and the grading are the same.
Three differences with the larger model appear in Table 11.
The smaller model does not decline. Given a superseded State alone, the larger model said “not settled” in 8 cases of 15 and was wrong in 6. The smaller model is wrong in all 15: it states the old value as the current one.
The gain from preparation does not fade with more lines. With five lines the right answers go from 13 to 19, where the larger model went from 19 to 22. The smaller model does not sort an old State from a new one when both are in front of it: when the current State was among the lines returned, it was still wrong 4 times in 29 on the raw version, and once on the prepared version.
The time of the entry changes little. The timed version gives 9, 14 and 13 right answers, against 7, 13 and 13 for the raw version.
The prepared version is still wrong 8 times with one line. In these cases the line had no tag, or a tag that covered another part of the line, or a tag that the model did not use.

6.7. Failures of the Prepared Memory

With one line returned, the prepared version is wrong three times. Two causes appear. In one case the labeling pass had not marked the superseded statement, so it carried no tag. In the others the tag covered one part of a statement that held two States: it corrected a count of commits and said nothing of a version number on the same line. Both are limits of the labeling, in line with Section 4.3: one pass finds about half of what two passes find.

7. A Record of the Current States

Section 6 repairs a memory after it is written. Another design keeps a record of the current value of each State and rewrites it as events arrive. We tested one such record on two materials: a world in which each change is stated in a sentence, and a benchmark in which a change is implied.

7.1. The STAR Record

A STAR record has three parts: the Things with their fixed properties, the States with their current values, and a list of open points. An open point is a value that the text gives without saying what it stands for. We call what a value stands for its role, and say that the role of such a value is open. The model rewrites the record after each group of events, from the previous record and the new events.
A program, called the overseer, can check each new record against the previous record and the new events. It applies four rules taken from the description of the world: a fixed property does not change, a rule of the world holds, a State that changed needs an event that names it, and a value is stored only if a sentence states its role. When a rule fails, the model corrects its record once. What still fails is put back to its previous value or emptied.

7.2. A Warehouse with a Computed State

The first material is a declared world: a world written as a program, so that what is true after every event is computed. The world is a warehouse. Its Things are bins, each with a capacity that never changes. Its States are, for each bin, its content, its zone and whether it has been shipped. Its Actions add units, take units out, move a bin and ship a bin. Its Relationships say that a content stays between 0 and the capacity, and that a shipped bin never changes again. The program draws a warehouse of 20 bins, plays 600 events and writes each one as an English sentence. We call this list of sentences a history. About one sentence in five gives a number that concerns nothing in the warehouse. One bin is introduced with an open role: “Bin K holds 30 units”, where 30 can be its capacity or its content. No later event concerns this bin, and the right answer to a question about it is that it is not determined.
The model reads the events in groups of 50 and keeps a memory between groups. Each history ends with 12 questions about the state at the end. The program computes the exact answer to each one, and a program compares it with the last line of the model’s reply. Six memories are compared (Table 12). The model is the smaller model in its reasoning variant (Qwen3-30B-A3B Thinking), with replies limited to 16,000 tokens. A token is the unit in which a model counts text, close to three quarters of a word. It was run on three histories, which gives 36 questions per memory.
Figure 4. The warehouse, three histories of 600 events: correct answers by memory, with the size of the memory read for each question.
Figure 4. The warehouse, three histories of 600 events: correct answers by memory, with the size of the memory read for each question.
Preprints 247623 g004
The record against the summary and the history. Answers from the STAR record are correct in 31 of 36 cases (86%), against 9 from the summary (25%) and 19 from the full history (53%). On the same questions, the record is right where the summary is wrong 23 times, and the reverse once (exact sign test, p < 0.001 ). Against the full history the counts are 15 and 3 ( p = 0.008 ). The record is one seventh of the size of the history, and its size depends on the number of bins and not on the number of events. A summary of 250 words cannot hold three States and a capacity for 20 bins, and nothing tells the model which of them to keep.
Expected and worst case for the full history. With the full history the model reasons at length, and 7 of its 36 replies reached the limit with no answer. They count as wrong in the expected case. If all 7 are counted as right, the full history reaches 72%, and its difference with the record is no longer reliable (9 against 4, p = 0.27 ). The difference between the record and the summary does not depend on this limit.
Errors of writing and errors of reading. Because the true record is computed, each wrong answer is assigned without a judge. A write error is a field of the record that differs from the true state. A read error is a wrong answer given from a correct record. Over all groups, 62 of the 2,772 fields written by the model are wrong (2.2%). Of the five wrong answers from the STAR record, three come from a wrong field and two from a wrong reading. One read error occurs with the true record as well: asked whether 5 more units can be put into a bin that has room and has been shipped, the model answers yes. The record holds the States. The rule on shipped bins is a Relationship, and the model has to recall it when it answers.
The open role. In its first record of each of the three histories, the model stored the number of bin K under one of the two roles, against the instruction to list it as an open point. This is the silent choice described in [1], made here when the memory is written.
The check by rules. The checked record gives 33 right answers of 36, against 31 for the plain record. The difference is not reliable (4 questions against 2). The overseer raised an issue in 10 of the 36 groups. In the first group of each history it flagged the value stored for bin K, and the record was corrected. On the groups that can be scored, it flagged 3 fields, all wrong, and did not flag 6 other wrong fields: a wrong content that stays within the capacity breaks no rule. In one history the model marked a bin as shipped by mistake, and the rule that protects a shipped bin then rejected every later change to it. A rule that keeps a record consistent with the previous one cannot tell that the previous one was wrong.
Shorter histories and the larger model. On two histories of 120 events, the smaller model answers all 24 questions from the STAR record, 21 from the full history and 17 from the summary. The larger model, on one history of 600 events, answers all 12 questions from every memory except the recent events alone. For that model these histories are too short to separate the memories, in line with [23].

7.3. A Benchmark of Implied Changes

The second material is STALE [5]. In each of its items, a later observation in a series of conversation sessions invalidates an earlier belief without negating it. In items of Type I the observation concerns the same attribute as the belief. In items of Type II it concerns another attribute, on which the belief depends. Each item has three questions, called probes. State Resolution tests whether the outdated belief is detected. Premise Resistance tests whether a question that presupposes it is rejected. Implicit Policy Adaptation tests whether the new state is applied in a later task.
We ran a reduced form: 30 items, 15 of each type, with 4 sessions per item where the benchmark uses 50. The smaller model writes the memories and answers the probes, with replies limited to 350 tokens. The same model grades the answers with the instructions of the benchmark. Four memories are compared: the four sessions as they are, a summary, the STAR record and the checked STAR record. The results cannot be compared with the table of [5], which uses full items and another judge.
Table 13. Reduced STALE run, 30 items: probes passed.
Table 13. Reduced STALE run, 30 items: probes passed.
Memory State Resolution Premise Resistance Implicit Policy Adaptation All probes
Sessions as they are 8 of 30 1 of 30 3 of 30 12 of 90 (13%)
Summary 12 of 30 6 of 30 8 of 30 26 of 90 (29%)
STAR record 6 of 30 3 of 30 6 of 30 15 of 90 (17%)
Checked STAR record 5 of 30 3 of 30 7 of 30 15 of 90 (17%)
The summary passes the most probes, and the record is close to the sessions read as they are. The same order holds for both types of item (Type I: 17, 10 and 9 of 45 for the summary, the record and the sessions; Type II: 9, 5 and 3).
The record does not see an implied change. The 30 records hold 645 States. The model marked 641 of them as current, 3 as in doubt and 1 as replaced. A change that no sentence states was written as one more State beside the first. The overseer raised no issue on any of the 30 records: its rules compare a record with the events that are stated, and an implied change breaks none of them.
Reliability of this run. Of the 360 answers, 214 reached the limit of 350 tokens. Where two memories led to the same answer, the judge gave two different verdicts in 4 cases of 90. Differences of a few probes are within this noise. The difference between the summary and the record (26 against 15) is larger, and it comes from one run of one model.

8. Discussion

A memory is ambiguous where it records change. Things and rules are written once and stay true. A State is written when it is observed, and the memory does not know when it stops being true. The score puts a number on this, by the labels of one model: 14% for States against 1% to 3% for the rest. A memory tool that wanted to lower its score would do it by handling States: giving each one a date, and linking a new State to the one it replaces.
Ambiguity has no effect until the view is reduced. The same logs gave 24 right answers of 24 when read in full, and 8 when read through one line. The ambiguity was the same in both cases. What changed is whether the reader had the means to resolve it. This is the situation of an assistant that searches its memory, and of a model that replaces its history by a summary [21]: both work from a reduced view, and what the reduced view lacks is the current State.
Agreement with earlier results. With one line returned, the larger model gave an outdated value in 6 answers of 24 and declined to answer in 10, and the smaller model gave an outdated value in 15. This is in the range reported for memories read by search [2,3,6]. The failure that those works produce with built data is present in logs written during ordinary work, at a similar rate.
A known remedy, applied to text files. Most of the systems cited in Section 2 keep the validity of each fact in a store, and the store decides what a search returns. A pointer from the old record to the new one is also in use [2,13,18], and several systems show the reader a replaced value with a mark [12,13,14]. The tags used here are that pointer, written into the text of the file. They need no store and no change to the search: the outdated line is still returned, and it now says what replaced it. This suits the memories studied, which are plain files read by several tools. The tags were written by a model that had the whole log. Preparing a memory is reading it once in full so that each later partial reading is safe.
Two ways for a memory to mislead. Read with the result of Chen [20], our measurement separates two failures. A rule is stated once and clearly: in the memories measured here, 2.6% of the Relationships are ambiguous. A rule fails when a reduced view of the history leaves it out. A State is restated each time it changes, and 13.6% of the States are ambiguous, most often because a later statement replaced them. A State fails when the reduced view keeps the old statement and leaves out the new one. The remedy has the same form in both cases: the statement that must not be lost is kept outside what is reduced. For a rule this is the rule itself, added again after each summary. For a State it is the current value, which the tag writes on the old line. The two remedies also share a limit. Chen reports that a later message claiming that the rule was withdrawn can still defeat a pinned rule. A tag is written from the labels of a model, and a wrong label would put a wrong current value on the old line.
A mark of time on natural logs. Qin and Lu [11] obtain a large gain from an order mark alone. Here the date of the entry gave none: the larger model declined more often and the smaller model was unchanged. The two materials differ in one respect that can explain it. In a benchmark of consolidated facts, the old and the new statement have the same form, so an order mark is enough to choose between them. In a session log the two statements rarely look alike, and a search that returns one line returns one of them. A date then says that the line may be old. Only the content of the later statement says what is true now, which is what the tag carries.
Expected and high case. The rate of 4% comes from one labeling pass of one model. With the union of two passes it would be near 6% (Section 4.3). Both passes mark States far more than the other categories. A second model marks almost nothing (Section 4.4), so the low case is not bounded by our data: what is supported is the place of the ambiguity and its effect on answers (Section 6), more than its rate. The test of preparation used the marks of one pass, which is the less favorable case for preparation: two of its three failures are statements or parts of statements that the pass did not mark.
A record helps where changes are stated. In the warehouse, each change is a sentence that names the State it changes. Keeping the record is bookkeeping, and the smaller model does it with 2.2% of its fields wrong. In STALE the change has to be inferred from an observation about something else. A layout does not make that inference, and the record did worse than a summary. One reading is that a summary keeps the sentences from which a reader can still infer the change, where a record reduces them to values. This agrees with Spencer [7], who finds that prose which carries the earlier value is read better than a record split into versions. We did not test this reading. Session logs stand between the two materials: a new status is stated, in a sentence that rarely names the statement it replaces. The tags of Section 6 were written by the larger model with the whole log in front of it: the same inference, made once, at the time of preparation.
Rules of the world as a check on a record. Fixed rules that check what a model writes are in use [11,13], on the form of an entry and the uniqueness of a value. The rules tested here state what the world allows. They caught the silent choice of a role, which no other part of the system saw. They did not improve the answers reliably, they missed wrong values that stay within the rules, they kept one wrong value in place, and they raised nothing on implied changes. Their use is limited to the errors that break a stated rule.

9. Limitations

  • One developer. All the memories come from one computer and one way of working. The third-party files are instruction files only.
  • One labeling model. The marks are those of one model. Two passes of that model agree on half of the marked statements. A second, smaller model, on 115 statements, agrees on the categories ( κ of 0.56) and not on the marks ( κ of 0.03). No human labeled the corpus.
  • One test project and 24 target questions. The differences with one line returned are large (8 against 16), and those with three or five lines are within what chance can give at this size.
  • Two answering models. The full reading was tested with the larger model only.
  • One search method. BM25 over the statements of one log. A search by meaning, or over several logs, would return other lines.
  • No comparison with a store that tracks validity. The prepared logs were compared with the raw logs, and not with a system that keeps the validity of each fact [2,4].
  • Grading. Answers graded right by pattern were not all read.
  • The questions come from the marks. The target questions were chosen among marked statements, so they measure the effect of preparation where the labeling found something. They do not measure the ambiguity that the labeling missed.
  • The warehouse test is small. Three histories and 36 questions per memory, one world with sentences produced from a few fixed wordings, and one model that the histories separate. The layout of the record was given to the model. The record before correction was not stored, so the overseer is scored in part only.
  • The STALE run is reduced. 30 items of 400, 4 sessions per item, one model that also grades, and answers cut at 350 tokens in more than half of the cases.

10. Conclusion

Earlier work showed that a model which searches its memory is misled by outdated facts, and that marking them when they are written removes the error. We measured how much of this is present in memories written during real work. In 485 memory files of coding assistants, by the labels of one model, about one statement in twenty-five is ambiguous, and the ambiguity is concentrated in States: 14% of them, against 1% to 3% of Things, Actions and Relationships. Half of the marks are old States that stay in the memory beside the new ones. Instructions, which are mostly rules, are clear. Logs and notes, which record where the work stands, are where the ambiguity is. A second model does not confirm the rates, and the test on answers supports where the marks fall.
On the logs of one project, this ambiguity has no effect on the larger model when it reads a whole log. It has a large effect when the model sees one line returned by a search: the line is usually a superseded State, and the model answers wrongly or cannot answer. The date of the entry does not help it answer, unlike on templated facts. A short note on the superseded line, saying what replaced it, doubles the right answers. The smaller model fails more often, never declines to answer, and gains from the note at every number of lines returned. The known remedy therefore holds on natural logs, and it can be applied to plain text files: the part of a memory to prepare is the State, and the place to do it is the line that went out of date.
A record of the current States, kept by the model, is the other remedy. It serves the smaller model well when each change is stated: in a simulated warehouse it gave 86% of right answers against 25% for a summary, and the computed state showed that three of its five wrong answers came from a field written wrongly. It did not help when a change is implied: on a reduced run of a public benchmark it did worse than a summary, and almost never recorded a State as replaced. A memory therefore fails in two places: where a replaced State is kept with no link to the new one, and where no statement says that a State was replaced. A note on the old line or a record repairs the first. The second needs the inference to be made by a reader that has the whole context.

Acknowledgments

The labeling and the tests were run with Claude Opus 5.5 (Anthropic). We thank the authors of Qwen3 and of llama.cpp for the open model and the software used in the tests on open models, and the authors of STALE for the public benchmark. The programs and the analysis were written with the assistance of Claude. The third-party files come from public open-source repositories, and we thank their authors.

Appendix A. Glossary

Action
Something that is done or was done: a command, a step, an event.
Ambiguity score
The share of the statements of a memory that carry at least one mark.
BM25
A standard ranking function for keyword search. It scores a text by the words it shares with the query.
Coding assistant
A language model that reads and changes the files of a software project at a developer’s request.
Declared world
A world written as a program, so that what is true after every event is computed.
Effort
A parameter of some models that sets how much the model reasons before it answers.
History
The list of all the events of a world so far.
Instruction file
A file that tells a coding assistant how to work on a project.
Mark
The name of one way in which a statement can be read in two ways.
Memory
The instruction files and the session logs of a project, taken together.
Open role
A value given by the text without saying what it stands for (for example, a capacity or a content).
Overseer
A program that checks a new record against the previous record and the new events, with rules taken from the description of the world.
Prepared memory
A memory in which each marked statement carries a tag.
Probe
One of the three questions attached to an item of the STALE benchmark.
Read error
A wrong answer given from a correct record.
Relationship
A rule that links Things, States or Actions.
Role
What a value stands for in the world.
Session
One period of work between a developer and a coding assistant.
Session log
A dated file of short notes written by a tool after each exchange of a session.
STAR
Things, States, Actions and Relationships: four categories that describe a world.
STAR record
A memory with a part for Things and their fixed properties, a part for States, and a list of open points.
State
Something that changes: a status, a version, a count.
Statement
One bullet, one table row or one sentence that says something about the project.
Superseded State
An older State that remains in the memory beside a newer one.
Tag
A short note added at the end of a marked statement, with the mark and its reason.
Thing
Something that exists, with properties that do not change.
Third-party file
A memory file of a project written by other people.
Token
The unit in which a model counts text, close to three quarters of a word.
True record
The record computed by the program from the events.
Write error
A field of the record that differs from the true state.

References

  1. Dubray, J.-J. STAR-Clarify: A Role-Ambiguity Benchmark and a Clarification Skill for Language Models. Preprints.org 2026. [Google Scholar] [CrossRef]
  2. Yadav, N. Temporal Validity in Retrieval Memory: Eliminating Stale-Fact Errors for AI Agents over Evolving Knowledge. 2026. Available online: https://arxiv.org/abs/2606.26511.
  3. Yadav, N. Temporal Validity on Real Software Histories: Eliminating Stale-Fact Errors in Code-Assistant Memory over GitHub Fixes. 2026. Available online: https://arxiv.org/abs/2608.20685.
  4. Rasmussen, P.; Paliychuk, P.; Beauvais, T.; Ryan, J.; Chalef, D. Zep: A Temporal Knowledge Graph Architecture for Agent Memory. 2025. Available online: https://arxiv.org/abs/2501.13956.
  5. Chao, H.; Bai, Y.; Sheng, R.; Li, T.; Sun, Y. STALE: Can LLM Agents Know When Their Memories Are No Longer Valid? 2026. Available online: https://arxiv.org/abs/2605.06527.
  6. Poikarayil, O. B.; Babu, T. B.; Nahhas, A.; Mehta, H. D.; Baktash, J. A.; De Luca, E. W.; Turowski, K. When Retrieval Is Not Enough: Obsolete Facts in Agent Memory; 2026; Available online: https://arxiv.org/abs/2610.36308.
  7. Spencer, Q. Ground Truth First: A Longitudinal Evaluation Instrument for Agent Memory, and the Tenure Crossover in Memory-Architecture Rankings. 2026. Available online: https://arxiv.org/abs/2607.21962.
  8. Xu, X.; Wu, W. Stale Instruction Files Override the Code in Coding Agents: A One-Sentence Fix. 2026. Available online: https://arxiv.org/abs/2610.30571.
  9. Chakrabarti, K. Why Does CLAUDE.md Keep Growing? Catastrophic Remembering in Agentic Coding. 2026. Available online: https://arxiv.org/abs/2608.11095.
  10. Zhou, Y.; Ouyang, Y.; Zheng, K.; Xiang, S. TEPA: Revoking Stale Memories for Conflict-Robust Language Agents. 2026. Available online: https://arxiv.org/abs/2608.07429.
  11. Qin, B.; Lu, Y. Memory of Memory. 2026. Available online: https://arxiv.org/abs/2609.25054.
  12. Fan, X.; Liu, M.; Yang, R.; Ouyang, S.; Han, J. Can Agent Memory Systems Track Evolving State? 2026. Available online: https://arxiv.org/abs/2608.19652.
  13. Li, Y.; Li, Y. What Should an Agent Forget? Separating What Is Stored from What Is Used. 2026. Available online: https://arxiv.org/abs/2609.10263.
  14. Shi, Z.; Tang, Y.; Tung, A. K. H. A-TMA: Decoupling State-Aware Memory Failures in Long-Term Agent Memory. 2026. Available online: https://arxiv.org/abs/2607.01935.
  15. Deng, H.; Sinchaisri, W. P. Stale, Misattributed, or Late: Where Personal Memory Fails Before Generation. 2026. Available online: https://arxiv.org/abs/2610.10265.
  16. Chatlatanagulchai, W.; Li, H.; Kashiwa, Y.; Reid, B.; Thonglek, K.; Leelaprute, P.; Rungsawang, A.; Manaskasemsak, B.; Adams, B.; Hassan, A. E.; Iida, H. Agent READMEs: An Empirical Study of Context Files for Agentic Coding. 2025. Available online: https://arxiv.org/abs/2511.12884.
  17. Aliabadi, H. H. Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents. 2026. Available online: https://arxiv.org/abs/2610.32578.
  18. Haghifam, M.; Rajabi, Z.; Sun, Y.; Morato, C. Personalized State-Transition-Aware Memory for Clinical Agents. 2026. Available online: https://arxiv.org/abs/2609.38490.
  19. Treude, C.; Baltes, S. Context Rot in AI-Assisted Software Development: Repurposing Documentation Consistency for AI Configuration Artifacts. 2026. Available online: https://arxiv.org/abs/2606.09090.
  20. Chen, S. Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agents. 2026. Available online: https://arxiv.org/abs/2606.22528.
  21. Devoto, A.; Vem, A.; Safavi, T.; Kariyappa, S.; Tseng, Y.-H.; Furgale, P.; Silveira Cabral, R. Letting Models Manage Their Own Context: Where We Stand; 2026; Available online: https://arxiv.org/abs/2611.34147.
  22. Shao, R.; Shen, Y.; Yin, Y.; Li, B.; Wang, Z.; Ivison, H.; Poovendran, R.; Lambert, N.; Xiao, C.; Lewis, M.; Yih, W.; Zettlemoyer, L.; Koh, P. W. Context Language Models. 2026. Available online: https://arxiv.org/abs/2609.37725.
  23. Guo, T.; Guo, C. Agent Memory as Rate-Limited Filtering: Explicit State Outlasts Long Context Beyond a Reader-Dependent Horizon. 2026. Available online: https://arxiv.org/abs/2611.02361.
  24. Shutova, A.; Olenina, A.; Vinogradov, I.; Sinitsin, A. Evaluating Memory Structure in LLM Agents. 2026. Available online: https://arxiv.org/abs/2602.11243.
  25. Kim, N.; Schuster, S. Entity Tracking in Language Models. ACL. 2023. Available online: https://arxiv.org/abs/2305.02363.
  26. Maharana, A.; Lee, D.-H.; Tulyakov, S.; Bansal, M.; Barbieri, F.; Fang, Y. Evaluating Very Long-Term Conversational Memory of LLM Agents. ACL. 2024. Available online: https://arxiv.org/abs/2402.17753.
  27. Wu, D.; Wang, H.; Yu, W.; Zhang, Y.; Chang, K.-W.; Yu, D. LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. ICLR. 2025. Available online: https://arxiv.org/abs/2410.10813.
  28. Hu, Y.; Wang, Y.; McAuley, J. Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions. 2025. Available online: https://arxiv.org/abs/2507.05257.
  29. Garg, I.; Kolhe, N.; Song, D.; Zhao, X. MemFail: Stress-Testing Failure Modes of LLM Memory Systems. 2026. Available online: https://arxiv.org/abs/2605.26667.
  30. Dubray, J.-J. star-mem: a plugin that tags replaced States in agent memory files. 2026. Available online: https://github.com/cognitive-fab/star-mem-plugin.
Figure 1. Ambiguity score by STAR category, the developer’s own memories.
Figure 1. Ambiguity score by STAR category, the developer’s own memories.
Preprints 247623 g001
Figure 3. Search reading: answers to the 24 target questions, by number of lines returned and by version.
Figure 3. Search reading: answers to the 24 target questions, by number of lines returned and by version.
Preprints 247623 g003
Table 2. The six marks. The examples are from the corpus.
Table 2. The six marks. The examples are from the corpus.
Mark Meaning Example
Unresolved reference The Thing cannot be identified from the memory alone “Version was bumped to 0.5.0 in both files” (the files are never named)
Several names One Thing under several names, or one name for several Things A plugin called bare-next-verify in some entries and Polygraph in others
Undated State A State with nothing that says when it held “15 more cells remaining in the ongoing evaluation”
Superseded State An older State still present beside a newer one “not yet committed”, then “committed and pushed” a few lines later
Missing actor or condition An Action with no actor, or no condition for when it is allowed A step to run, with no word on who runs it
Unclear scope A rule that can be read narrow or broad A limit of one button per “page section”, where a section is not defined
Table 5. The developer’s own memories: statements, marks, and the share of each category in the total of marked statements.
Table 5. The developer’s own memories: statements, marks, and the share of each category in the total of marked statements.
Category Statements Marked Score Share of marked
Things 6,683 62 0.9% 5%
States 5,023 683 13.6% 60%
Actions 7,569 167 2.2% 15%
Relationships 8,632 223 2.6% 20%
All 27,907 1,135 4.1% 100%
Table 6. Marks in the developer’s own memories.
Table 6. Marks in the developer’s own memories.
Mark Count Share
Superseded State 551 48%
Unresolved reference 211 18%
Unclear scope 154 13%
Several names 112 10%
Undated State 96 8%
Missing actor or condition 21 2%
Table 9. What the search returns for the 24 target questions.
Table 9. What the search returns for the 24 target questions.
Lines returned 1 3 5
The current State is among them 3 12 14
A superseded State is among them 15 21 21
A superseded State, and not the current one 15 11 10
Table 10. Search reading, target questions: right / not settled / wrong. The lower part is limited to the questions for which the search returned a superseded State and not the current one.
Table 10. Search reading, target questions: right / not settled / wrong. The lower part is limited to the questions for which the search returned a superseded State and not the current one.
Lines returned Raw Timed Prepared
All 24 target questions
1 8 / 10 / 6 7 / 14 / 3 16 / 5 / 3
3 16 / 7 / 1 17 / 6 / 1 17 / 7 / 0
5 19 / 5 / 0 20 / 3 / 1 22 / 2 / 0
Superseded State returned without the current one
1 (15 questions) 1 / 8 / 6 1 / 11 / 3 9 / 3 / 3
3 (11 questions) 4 / 6 / 1 5 / 5 / 1 5 / 6 / 0
5 (10 questions) 5 / 5 / 0 6 / 3 / 1 8 / 2 / 0
Table 11. Search reading with the smaller model, target questions: right / not settled / wrong.
Table 11. Search reading with the smaller model, target questions: right / not settled / wrong.
Lines returned Raw Timed Prepared
All 24 target questions
1 7 / 2 / 15 9 / 1 / 14 13 / 3 / 8
3 13 / 1 / 10 14 / 2 / 8 17 / 2 / 5
5 13 / 0 / 11 13 / 0 / 11 19 / 0 / 5
Superseded State returned without the current one
1 (15 questions) 0 / 0 / 15 1 / 0 / 14 6 / 1 / 8
3 (11 questions) 2 / 0 / 9 3 / 1 / 7 5 / 1 / 5
5 (10 questions) 2 / 0 / 8 2 / 0 / 8 6 / 0 / 4
Table 12. The six memories.
Table 12. The six memories.
Memory What the model reads when it answers
Full history All the sentences of the history.
Recent events The last group of 50 only: what is known with no memory.
Summary Notes of at most 250 words that the model rewrote after each group.
STAR record The record that the model rewrote after each group.
Checked STAR record The same record, checked after each group by the overseer.
True record The record computed by the program: what a perfect writer would give.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.