stale docs and ai agents
Tell your agent which sentence is out of date.
A coding agent trusts the docs it reads. When a merged pull request makes a sentence outdated, Meldoc tells the agent which sentence and which pull request.
Click a step
the agent reads the page as a file
task
Cache sessions until they rotate.
read · docs/auth/sessions.md
Sessions rotate every 24 hours, with a 24-hour grace period.
agent
Sessions rotate every 24 hours, so I will cache them for 24.
sessionCacheTTL = 24 * time.Hour
the same agent reads it from Meldoc
task
Cache sessions until they rotate.
docs_get · platform/auth/sessions
Sessions rotate every 24 hours, with a 24-hour grace period.
Outdated sentence
“Sessions rotate every 24 hours”
PR #518 changed the rotation interval from 24 to 12 hours.
agent
The page says 24 hours, but PR #518 changed it to 12. I will cache them for 12.
sessionCacheTTL = 12 * time.Hour
docs_update · platform/auth/sessions
Sessions rotate every 12 hours.
what the code says since PR #518: rotateAfter = 12 * time.Hour
This is an example session. Meldoc tells the agent, and the agent decides what to do.
1 what the agent gets
The agent gets the finding together with the page.
When the agent reads a document with docs_get and something in it is outdated, the answer
includes a check block with the findings. Each finding quotes the sentence, says why it is
outdated and names the change that caused it.
missed means the change is merged and the sentence is still not fixed. No check block
means no open findings. It does not mean the page was verified.
Works with Claude Code, Cursor, Claude Desktop and any other MCP client, on every plan.
// title, content, links
"check": {
"state": "missed",
"findings": [{
"quote": "Sessions rotate every 24 hours",
"reason": "The pull request changed the
rotation interval from 24 to 12 hours.",
"openSince": "2026-11-17T09:42:00Z",
"pr": { "number": 518,
"title": "Shorten session rotation" }
}]
} 2 what the agent can do
One call lists every outdated sentence in a project.
docs_audit with kind=outdated returns every open finding in a project, most urgent
first. An agent with write access can fix a sentence with docs_update, and the edit closes the
finding.
Reading findings needs only read access to the project.
"counts": { "missed": 3, "waiting": 1 },
"items": [
{ "doc": { "title": "Session rotation" },
"state": "missed",
"quote": "Sessions rotate every 24 hours",
"pr": { "number": 518 } },
// and three more
],
"hint": "3 finding(s) need a fix now (`missed`).
Fix the quoted sentence with docs_update …" 3 where the findings come from
A finding comes from the change that made the sentence outdated.
- A pull request that changes the code
- Meldoc reviews the pull request and reports the sentences it contradicts. If it is merged anyway, the finding stays on the document.
- An edit in docs that other docs rely on
- A product guide can follow the technical docs. When a technical page is edited, Meldoc flags the sentences in the guide that no longer match it. This is Sources, part of the Pro plan.
The review is off by default. You turn it on per project, and findings start with the next change.
why it matters
An agent does not doubt the page it reads.
A developer who opens a two-year-old page reads it with suspicion and checks the code. An agent takes the page as given and builds on it. Its code can pass review and still rest on a number that changed.
Agents read the code too. Code does not say why a limit exists or what another team expects. That is in the docs.
- 90%
- of the time, two coding agents followed an outdated instruction file over the code in front of them. Xu, Wu, preprint, 2026
- 23%
- of repositories in one study had agent instructions pointing to code that no longer existed. Treude, Baltes, preprint, 2026
- 1 in 4
- of the most popular GitHub projects had docs pointing to code that no longer existed. Tan, Wagner, Treude, Empirical Software Engineering
The first two studies looked at instruction files such as AGENTS.md, which Meldoc does not check. They show how an agent treats text it is given.
other ways to keep an agent up to date
How the usual approaches compare.
| Approach | What it knows | What the agent gets | Where it falls short |
|---|---|---|---|
| Re-crawling on a schedule | How old its copy is | A fresh copy of the page | A fresh copy of an outdated page is still outdated. |
| Ranking by recency | Which source was edited last | The newest source first | The newest page can still describe the old behaviour. |
| A review date | When a person last confirmed the page | “Verified” until a date | The page can be outdated for months before the date comes. |
| Findings from the change Meldoc | Which change made which sentence outdated | The page, the outdated sentence and the pull request | Only for docs kept in Meldoc, and only for changes that went through the review. |
limits
What Meldoc does not do.
- Decide for the agent
- Meldoc delivers the finding. The agent decides what to do with it.
- Check AGENTS.md or CLAUDE.md
- Only the documents kept in Meldoc are checked.
- Flag outdated pages in search
- docs_search does not include findings. They come when the agent opens the document.
- Guarantee that a page with no findings is right
- It only means no reviewed change has contradicted it so far.
questions
Frequently asked.
What happens when an AI agent reads outdated documentation?
How does an agent know a Meldoc document is out of date?
Which agents does it work with?
Can the agent fix the documentation itself?
Does it keep AGENTS.md or CLAUDE.md up to date?
Is a document without findings verified?
Is this what people call context rot?
What does it cost?
Give your agent docs that say when they are out of date.
claude mcp add --transport http meldoc "https://api.meldoc.io/mcp"