A documentation drift agent for Claude Code, Codex and Cursor
Docs Drift finds statements in a repository's docs that its code no longer matches and proposes the edits as a diff. It works from the workspace's code index, decisions and lessons, and the context ContextStream picks for the job.
Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.
Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.1.0 · Updated
What does Docs Drift do?
Finds statements in a repository's README and docs that the code no longer matches, and proposes the edits as a diff, each backed by the code that shows it.
What it declines
It does one job. A task like one of these is declined with a reason:
Changing code to match the docs.
Writing new docs or a guide to the repository (Repo Guide does that).
Committing or pushing the edits: it returns a diff for a person to apply.
Judging style, tone or grammar.
What can Docs Drift access, and is it safe to turn on?
Docs Drift gets a short-lived token for one workspace that lets it do only this: search the workspace's code index; read the workspace's decisions and lessons; save one note per run; read the lessons, preferences and decisions ContextStream picks for its job; mark the context items its result cited as helpful; and call models through ContextStream's model proxy, within a cap set for the run. It works in one project, only for that run, and declines any task outside its job. The only things Docs Drift may change are these: it may save one note per run; and mark the context items its result cited as helpful. A workspace owner or admin turns it on.
Model agent. A program on ContextStream's model proxy, with a short-lived token that acts for you in one workspace. It is stopped after 5 min.
Scope
What it lets a run do
search.read
Search the workspace's code index
memory.read
Read the workspace's decisions and lessons
memory.write.note
Save one note per run
context.read
Read the lessons, preferences and decisions ContextStream picks for its job
context.feedback
Mark the context items its result cited as helpful
model.invoke
Call models through ContextStream's model proxy, within a cap set for the run
How is Docs Drift tested?
Docs Drift is checked on 7 cases, each with a known right answer: workspaces whose docs hold seeded statements the code no longer matches, and inputs it must refuse or decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: every finding is seeded drift and every seeded drift is found, every piece of evidence is code the index holds, the proposed diff carries the expected edits, and no decoy text gets into the result. The code index, the docs and the model's replies are fixed test data, so the cases check how findings are held to the code, not the live model's own reading of the docs. Version 0.1.0 passes all 7.
It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.
What does a real run of Docs Drift look like?
The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.
Two live runs on the same input flagged the same statement, README.md:84 against crates/mcp-server/src/main.rs:2485; their proposed edits are worded differently. The third example is from the agent's test suite.
Live run on ContextStream
A README default the code no longer matches
Version
0.1.0
Outcome
succeeded
Ran
2026-10-28 00:53 UTC
Took
1 min 21 s
ContextStream's Demos workspace, in the project that indexes the public repository github.com/contextstream/mcp-server, checking README.md and docs/clients.md against the code.
1 statement(s) in 5 doc(s) no longer match the code. Documentation has drifted regarding default transcript capture settings, which are configured to off by default rather than on.
Findings
Doc
Says
Code shows
Evidence
README.md:84
Transcript saving and local Git metadata capture are on by default and can be
turned off.
Default transcript behavior is configured to 'Off (recommended)' by default (selection index 0) rather than being enabled by default.
crates/mcp-server/src/main.rs:2485
Proposed edit
--- a/README.md
+++ b/README.md
@@ -94,2 +94,1 @@
-Transcript saving and local Git metadata capture are on by default and can be
-turned off. Review [data
+Transcript saving and local Git metadata capture are off by default and can be turned on. Review [data
Checks: 5 of 5 passed
docs_read: 7 doc excerpt(s) from 5 doc(s).
claims: 4 checkable claim(s) quoted exactly from the docs.
evidence: Every finding cites code found in the index.
diff: 1 of 1 finding(s) placed in the diff.
workspace_context: 6 context items from ContextStream for this job, about 527 tokens.
Task
dced992d-74bc-45bb-b3a9-14c96e824832
Live run on ContextStream
The same check, run again
Version
0.1.0
Outcome
succeeded
Ran
2026-10-28 00:54 UTC
Took
30.4 s
ContextStream's Demos workspace, in the project that indexes the public repository github.com/contextstream/mcp-server, checking README.md and docs/clients.md against the code.
1 statement(s) in 5 doc(s) no longer match the code. Documentation mostly aligns with current configuration and remote endpoints, but transcript saving is now off by default rather than on.
Findings
Doc
Says
Code shows
Evidence
README.md:84
Transcript saving and local Git metadata capture are on by default and can be
turned off.
Transcript saving defaults to off ('Off (recommended)') rather than being enabled by default.
crates/mcp-server/src/main.rs:2485
Proposed edit
--- a/README.md
+++ b/README.md
@@ -94,2 +94,2 @@
-Transcript saving and local Git metadata capture are on by default and can be
-turned off. Review [data
+Transcript saving is off by default, while local Git metadata capture is on by default and can be
+turned off. Review [data
Checks: 5 of 5 passed
docs_read: 7 doc excerpt(s) from 5 doc(s).
claims: 4 checkable claim(s) quoted exactly from the docs.
evidence: Every finding cites code found in the index.
diff: 1 of 1 finding(s) placed in the diff.
workspace_context: 6 context items from ContextStream for this job, about 527 tokens.
Task
3a25e178-f094-4223-93dd-d24628addca1
From its test suite, not a live run
A renamed setting the README still names (test case)
Version
0.1.0
Outcome
succeeded
Ran
2026-10-27 17:28 UTC
Took
Not timed (test data)
The agent's offline test suite: its real program, against a stand-in for ContextStream, a scripted model and fixtures, with no network. Not a live run.
1 statement(s) in 1 doc(s) no longer match the code. One setting was renamed.
Findings
Doc
Says
Code shows
Evidence
README.md:10
Set `DATABASE_URL` to your Postgres URL.
The code reads PG_URL; DATABASE_URL is no longer read.
src/config.ts:5
Proposed edit
--- a/README.md
+++ b/README.md
@@ -11,1 +11,1 @@
-Set `DATABASE_URL` to your Postgres URL.
+Set `PG_URL` to your Postgres URL.
Checks: 5 of 5 passed
docs_read: 1 doc excerpt(s) from 1 doc(s).
claims: 2 checkable claim(s) quoted exactly from the docs.
evidence: Every finding cites code found in the index.
diff: 1 of 1 finding(s) placed in the diff.
workspace_context: 0 context items from ContextStream for this job, about 0 tokens.
Test case
env-var-renamed, in its test suite
Depot run
lh9rrpq6ff
Which tools does Docs Drift work with?
Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Docs Drift. It also runs from a terminal or an agent's shell with csa run docs-drift, and from the ContextStream web app.
Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Docs Drift.
A terminal or an agent's shell:csa run docs-drift, installed with ContextStream's command line.
The web app: the workspace's agent library.
How do I turn Docs Drift on?
An owner or admin of your ContextStream workspace turns Docs Drift on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.
Sign in to ContextStream: the button below opens the agent library on Docs Drift.
An owner or admin switches Docs Drift on for the workspace.
Pick the project it works in, and run it from the library, from your coding agent or with csa run.
How do I call Docs Drift from Claude Code or Codex?
Ask your coding agent to hand the job to Docs Drift, or call it yourself: csa run docs-drift in a terminal, or agents(action="run", agent="docs-drift", input={...}) over MCP.
Connect ContextStream's MCP (it also writes each editor's connection):
In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):
csa run docs-drift project_id=00000000-0000-4000-8000-0000000000a1
Input
Field
Type
What it is
project_id
string, required
The indexed project whose docs to check.
paths
string[]
Docs to check, for example README.md or docs/setup.md. Defaults to the README and the docs the index finds.
focus
string
A topic to check, for example "configuration" or "the CLI".
save_note
boolean
Save the findings and the diff as a note in the project.
What does Docs Drift cost?
Docs Drift costs 800 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (12 runs of Docs Drift, if spent on nothing else), and Pro is $19 a month with 25,000.
A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.
CI Fixer reproduces a failing test command in a public repository and returns the smallest change to the project's code that makes it pass, with the passing output.
Checked on 13 test cases with known answers: all 13 passv0.1.0