Skip to content

Engineering

2 min read

AI memory needs an expiry policy

An agent can remember yesterday correctly and still make the wrong decision today. Give stored observations a scope, evidence, and recheck conditions.

Imagine a coding agent saves a note: “Checkout tests passed.” The next day, you change shipping calculations and ask it to prepare a release. It retrieves the note and skips checkout verification.

The memory was accurate. It was missing a boundary: which version passed?

On October 19, 2026, GitHub documented continuing a Copilot app session in VS Code with the conversation, code changes, and worktree intact. Resuming work is getting easier. Preserving its history still leaves a separate question: does an earlier conclusion apply now? GitHub’s session handoff guide.

Illustrative sequence: checkout tests pass on commit A, shipping code changes, and commit B needs a fresh check.

What a passed check needs to remember

For that hypothetical checkout task, a more useful note would look like this:

JSON
{
  "claim": "Checkout tests passed",
  "scope": "checkout",
  "commit": "<tested-commit>",
  "environment": "local",
  "evidence": "<test-report-path>",
  "recheckWhen": ["checkout code changes", "dependency changes"]
}

This is a proposed note format, not a tool standard. Replace the angle-bracket placeholders with actual evidence.

Before preparing the release, the agent can compare the current commit with the tested one, inspect the changes, and determine what needs another check. If the report is unavailable, the missing evidence is explicit. A summary cannot become a fresh test result on its own.

Give different memories different rules

Three categories are enough for a starting policy:

Memory

Example

Revisit when

Confirmed preference

Write technical docs in English

The user changes the request

Project decision

Store media in one shared bucket

Related architecture or configuration changes

State observation

Tests passed; a URL works

Using it to make a claim about current state

This proposed classification manages freshness. It does not grant authority: remembering a previous deployment is not permission to deploy again.

Anthropic’s September 2025 context-engineering article describes external notes and retrieving information when needed. Those techniques support continuity; the revalidation policy here is an additional design proposal. Anthropic’s context-engineering article.

Every task need not load every note. A checkout investigation needs checkout history and a way to verify it. Last month’s homepage color decisions add little to that investigation.

Try a stale-memory check

Try a small evaluation: create a fixture repository, save a passing-test note, then alter a fixture so the tests fail. Ask the agent whether the change is ready. Observe whether it rechecks the evidence or repeats the note. This is a proposed evaluation, not a reported experiment.

When an agent cannot recover a memory’s evidence, “the previous version passed; this version is unverified” is a useful handoff. It tells the next person exactly what remains to be done.

Share

Comments (0)