← All writingNovember 22, 2026

Your CLAUDE.md is drifting

The files that brief your coding agents go stale quietly. Why that matters, and why I built a small tool to check them.

If you use coding agents seriously, you probably keep a file that briefs them: a CLAUDE.md, a runbook, a page of notes. It says where things live, which service does what, how to deploy. The agent reads it at the start of every session and treats it as true.

That is exactly the problem. Those files are written once and edited rarely, while the systems they describe change every week.

Stale context fails silently

When a person reads an outdated runbook, they notice. The port does not answer, the file is not there, and they adapt. An agent is more likely to carry on with full confidence and build on the wrong fact.

In distributed-systems terms, the briefing file is a cache. Nobody would run a production system with a cache that is never invalidated. Yet that is how most agent context works today.

Checking context instead of trusting it

Many statements in these files are checkable. “The app listens on port 3000.” “Restarts go through this service.” “The code lives in this repository.” Each one can be verified against the live system in milliseconds.

So I built driftcheck. It pulls the checkable claims out of markdown files and tests each one: does the path exist, is something listening on the port, is the service healthy, does the repository exist. It runs as a command-line tool, on a schedule, or as an MCP server that agents can call themselves.

Design choices that mattered

It is deterministic. No language model decides whether a fact is true; plain checks do. A model can read the report, but it should not write it.

It does not cry wolf. Anything it cannot judge reliably is reported as unverifiable rather than as drift. A tool that raises false alarms gets ignored within a week.

Scope is explicit. Some facts are only true on another machine, so they can be tagged instead of guessed at.

It is read-only. A tool that checks your environment should never change it.

The broader point

As agents do more unattended work, the quality of their context becomes an operational concern, not a documentation chore. It deserves the same treatment as any other input to a production system: validated, monitored, and kept current.

driftcheck is open source and on PyPI as driftcheck-mcp.

Saurav Modi, Senior Software EngineerDiscuss on LinkedIn ↗