# How to keep AI notes current when the code changes

Canonical: [How to keep AI notes current when the code changes](https://contextingo.com/guides/outdated-notes-when-code-changes)

Locale: en

Purpose: Notes about your code go stale after a merge. How Contextingo flags a record when a merged pull request changes the file it cites, so no AI trusts it blindly.

Content updated: 2026-10-27

Source revision: content.ts 2026-10-27

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/guides.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

A note saved last month says “login uses session cookies”. Then the login code changes and the note stays exactly as it was, and the next AI still acts on it. Contextingo ties each record to the files it cites and marks the record outdated when a merged pull request changes one of them.

1. **Cite the file in the record.** When a finding or decision describes code, add the file as a source with `context_upsert`, for example `src/auth/login.ts`. A finding also needs the commit you checked, so the marking knows what the record describes.
2. **Merge as usual.** Nothing changes in your workflow. When a pull request merges, Contextingo reads the list of files it changed. It does not read the code itself. If a webhook is missed, the next reconciliation checks the recent merged pull requests again.
3. **Every record that cites a changed file is marked.** Each record that cites one of those files is marked outdated. The record stays in the project with its history, and the marking tells the next AI that the code has moved on since the record was written.
4. **The next AI checks before it relies on it.** When an AI reads an outdated record, it checks the code first. If the record is still right, it saves a new version with a fresh commit. If it is wrong, it corrects the record, or archives it, so the next reader gets the current picture.

## Questions

### Does Contextingo read my code to do this?

No. The GitHub App reads pull request metadata and the list of changed files. It has no access to the contents of your repository.

### Does this work for a solo developer?

Yes. You do not need a team for it. A solo developer who switches between Claude Code and Codex gets the same marking on the same project.

### What if a note is still correct after the change?

The next AI checks it, saves the record again with the commit it checked, and the record is current again. Nothing is deleted.
