Last week, our automated memory regression suite ran 57 questions, burned 3.6 million tokens, and came back 57/57 green.
Thirty-six of those questions tested open items in our failure bank.
The grading script worked fine. The agent had passed an open-book exam: during the 45-question batch, it queried the regression ledger 42 times, read the expected behavior straight out of the record, and echoed it back. Under our own automation rule, a second clean run seven days later would have marked seven unresolved items as verified.
We paused the loop that night. It forced a more basic question than how to build self-improving agents: when an agent remembers more, what counts as evidence that the system improved?
Disclosure: Wallaby provides inference-as-a-service for curated large language models and maintains the open-source wallaby-agent-rules repository. These four experiments come from the file-based memory tooling we use on our own internal projects, not customer workloads.
1. The benchmark passed 57/57. Thirty-six items were still open.
We built a weekly regression exam to stop solved operational mistakes from returning. A deterministic script checked due dates each morning without calling a model; every seven days, a full pass ran against the entire question bank.
Two numbers ended that experiment.
First, the cost grew faster than our estimate. A 12-question run took 15 turns and 1.128 million tokens. A 45-question run took 18 turns and 2.497 million tokens. Together, the 57-question bank consumed roughly 3.6 million tokens and 13 minutes per sweep, with more than 90% going to cached context re-reads. Because the bank only added questions and never retired them, that bill had no ceiling. Evaluating agent loops means tracking cost per accepted output, not token volume alone.
Second, the score could not distinguish a fixed failure from an open one. Tool-usage logs showed 12 lookups of the regression ledger during the 12-question batch and 42 lookups during the 45-question batch. Newer test IDs even carried item identifiers pointing straight to the record that held the expected answer. All 57 questions passed, including 36 tied to issues that remained unresolved.
Adding more questions cannot repair a false pass. If the evaluated agent can read the grading rubric or the source ledger holding the expected answer, green scores measure lookup compliance rather than behavioral change. Verifier, prompt, expected answer, and candidate memory store have to stay separated. External suites like our LongMemEval-S benchmark run with Kimi K3.1 Pro keep the grading set outside the live workspace, whereas an internal self-exam shares the same disk.
We turned off automated runs and automated status flips the same evening. Deterministic code tests and manual intake stayed active, while the 89 items previously assigned to exam-based verification were marked as having no trusted automated verdict.
2. A memory record is a historical claim, not current state
A retrieved entry can be accurate to the letter and still give the wrong answer about today.
In our workspace, decisions and failure records keep a registration status. Follow-up progress lands in a chronological log. When an agent looked up an older entry, it saw the original status line and missed everything that happened after registration.
Our first fix targeted lookup by explicit ID. Whenever a record had later log entries mentioning it, the lookup tool attached the latest follow-up pointer. On 140 entries with subsequent log activity, coverage jumped from 0 to 140, matching an independent baseline entry by entry. Payload size grew by 7.1% to 9.0%, and each lookup added about 8 ms.
Then we audited how queries work in practice. Across 160 blind-written task queries, only 1 contained an ID.
That single number invalidated the victory lap. Ninety-nine percent of real queries searched by topic words, not record numbers, so our 140/140 patch missed almost every real lookup.
We rebuilt the feature on the keyword search path 21 minutes later and cached the log index by file state. On 196 labeled keyword queries, the target record list stayed identical at 167 entries, and the 71 entries with post-registration log activity moved from 0 to 71 accurate follow-up pointers. On the 160 natural task queries, hit sets and miss sets stayed unchanged, 50 of 83 returned entries gained a follow-up link, payload grew by 1.0% to 3.2%, and the cached index erased the earlier 8 ms latency bump.
The fix is a schema boundary: return recorded_state and latest_later_event as separate fields. A follow-up log line is an entry point for live verification, never a substitute for checking current state.
This experiment still has clear boundaries. We measured link coverage, pointer accuracy, payload growth, and latency. We did not measure whether models answer status questions more accurately after seeing the link. A later log entry written with different wording and no explicit back-reference still escapes the pointer. Regular AGENTS.md and memory file maintenance reduces that drift, yet phrasing mismatches remain an open problem.
3. Retrieval is not routing, and routing is not behavior
Storing more procedures in memory can make an agent noisier without making it smarter.
When a project accumulates dozens of scripts and workflows, dumping every rule into every startup prompt wastes tokens and drowns out the relevant instruction. Even offline skill refinement from real failure traces only helps if the right instruction loads when the task arrives, so we measured three layers separately: offline ranking, silence rate, and fresh-session behavior.
On 12 natural-language task descriptions with known answers, plain trigger-word matching placed the right capability in the top three 5 times. Task-and-path matching raised top-three hits to 9 out of 12.
Next, we replayed 408 real user prompts through the router. Forty-seven percent produced no capability hint at all. That silence matters: when no stored workflow fits the task, returning nothing is the correct output. Forcing a recall on every turn injects false confidence into the prompt.
Finally, we ran 8 fresh agent sessions to see whether surfaced hints changed actual execution. Every session passed the task description at startup and retrieved the right capability. Seven of the eight tasks produced identical results before and after the change, so the test set could not separate them. The eighth task went through four wording iterations and exposed the real gap:
| Iteration | What the router surfaced | Fresh-session result |
|---|---|---|
| Baseline | No task-routing hint | 1/1 |
| Soft hint | "May already exist" | 0/1 |
| Fast-path exit | Soft hint plus rule to leave fast lane | 1/3 |
| Exact match | Matched filename labeled "already exists" | 3/3 |
Look at row two. Putting the right capability in context with hesitant phrasing scored 0/1, worse than baseline. Behavior only shifted reliably when the router matched the exact file entry and stated plainly that the capability existed.
Retrieval metrics, routing coverage, and downstream task behavior are three separate gauges. Routing should be logged as an auditable decision capturing task text, candidates, match reason, response size, and outcome. Calling a top-three recall gain a task-success gain skips the hardest link in the chain.
4. Zero regression proves you did not break yesterday
Before shipping any memory change, we run a retention suite. Across 1,110 saved queries, including 870 by-ID checks, our read-path revisions produced line-for-line identical pass counts before and after the edit.
That green wall is necessary. It proves zero regression on old slices, and nothing else.
Acceptance has to sit outside candidate generation. We saw why when reviewing how draft capabilities graduate into permanent status. Earlier, six entries had been promoted directly without a strict mechanical check. A later audit against their original graduation conditions forced us to revert three of the six back to probation.
When we replaced that manual step with a deterministic promotion gate requiring every condition to pass, the first run promoted 3 rows, changing three characters in the entire registry, and left 1 row with custom criteria untouched.
Fast changes and slow changes cannot share the same approval authority. Read-path indexing or cache tweaks can iterate daily because they are reversible and testable against saved baselines. Promotion rules, evaluation criteria, and permission boundaries move slower and require explicit human approval. Our AI agent memory governance CLI enforces that split on plain files: scripts check prerequisites, record contradictions, and verify diffs, while permanent policy shifts stay behind human sign-off.
Summary of the four experiments
| Experiment | Measured result | Cost or failure exposed | What it does not prove |
|---|---|---|---|
| Regression exam audit | 57/57 passed, including 36 open items | ~3.6M tokens per sweep; 42 ledger lookups in 45 questions | Does not prove fixed behavior or verifier independence |
| Post-registration pointers | 140/140 by-ID; 71/71 keyword follow-up links | Only 1/160 real queries had an ID; +1.0% to +3.2% payload | Does not prove higher final model answer accuracy |
| Task-aware routing | 5/12 to 9/12 top-3 hits; 47% silent on 408 prompts | Soft wording scored 0/1 vs. 3/3 for exact match | Does not prove cross-session learning or general task lift |
| Retention and promotion gate | 1,110/1,110 zero regression; 3 rows auto-promoted | 3 of 6 earlier direct promotions had to be reverted | Does not prove long-horizon stability across new workloads |
Six questions before calling a change an improvement
Across all four experiments, the same six questions separated engineering progress from false signals.
| Question | What to check | Failure mode when skipped |
|---|---|---|
| State | What persisted into the next run? | Stale status records pose as live facts |
| Evidence | What independent check saw the change? | Open-book tests score 57/57 on unresolved items |
| Update | How did evidence change stored state? | Unverified scores flip statuses automatically |
| Credit | Which exact edit caused the gain or drop? | Soft wording hides behind healthy recall numbers |
| Time | Are fast experiments split from slow rules? | Daily tweaks overwrite permanent constraints |
| Authority | Who can accept edits or change the rubric? | Candidate generators grade their own homework |
Saving only outcomes throws away the part that teaches you anything. Before running the next memory experiment, we write down a short bet card and fill the bottom half after the run:
Editable object: <what changes> Prediction: <expected delta and confidence> Independent check: <verifier separated from the memory store> False-pass risk: <how this test could pass while broken> Cost and retention:<tokens, latency, and old-slice check> Surprise and cause:<what broke the prediction and why> Decision & owner: <accept / revert / hold; who approves> In our second experiment, the prediction was that by-ID follow-up pointers would fix stale status answers. The surprise was that 159 of 160 real task queries carried no ID at all. Recording that gap changed the design; recording only "140/140 passed" would have buried it.
What we have not proven
Four claims remain unproved by this work:
- End-to-end task accuracy improved across different models because of these memory changes.
- The improvement mechanism itself grows stronger from one iteration to the next.
- Gains transfer across unrelated tasks or model families.
- Any form of compounding recursive self-improvement occurred.
Everything here sits in bounded, persistent engineering improvement. That floor is still worth building carefully, because open-ended self-improvement built on contaminated tests and stale state compounds errors faster than capability.
If you run an agent memory or self-improvement loop today, pick the last change your system marked as an improvement and run it through the six questions above. If any row reduces to "the agent said it passed", mark that change unverified, add one contamination test and one retention check, and hold off on automating further until the evidence stands on its own.
The file-based core and deterministic governance scripts behind our setup are open source at wallaby-agent-rules on GitHub, and we publish our full experiment notes and benchmarks on the Wallaby engineering blog.

