Launch offer: the first 1,000 users get Settl free for a year* Claim your spot
settlbuilding in public

Feed it the docs: why AI writes code for a library version that stopped existing

I build Settl, an expense-splitting app, solo with Claude, and I once lost an afternoon arguing with it about a router API that had been renamed a year earlier. It apologised every time and wrote the same dead code back. It was not being stubborn. It had never seen the new API.

Why the model is stuck in the past

The weights froze at training time: no index behind them, no lookup, no clock. Everything the model knows about your dependencies was compressed into parameters months before you opened the chat. Add the months to release, plus the months you have been using it, and eighteen months of unseen releases is ordinary.

Density matters more than recency. It saw the old API in ten thousand tutorials and answers. The new one, if it made the cutoff at all, sits in a handful of docs pages and one migration guide. So even when it names the current major version in prose, the old call stays the higher-probability continuation in the code.

Why arguing never works

You say "that is deprecated". It apologises, agrees, and writes the same thing back with a different variable name.

Correction moves the conversation. Information moves the output.

The signs it is a cutoff problem

Spot one and stop typing corrections. Send this instead:

Do not rewrite it yet. Which version of react-router are you assuming, and
which release introduced the API you just used? If you are not sure, say so
and tell me which file to paste for you.

What to paste, in order of value

Worth nothing: "use the latest version", or a link it cannot open.

# what is installed, not what the model remembers
npm ls react-router zod
ls node_modules/react-router/dist/*.d.ts

The version briefing

Paste this at the top of any session where a library matters:

Before writing any code, state which version of each library you are assuming
and where that assumption came from. Then check it against these facts.

INSTALLED VERSIONS (from the lock file, authoritative):
  react-router 7.4.1
  zod 4.0.2

WHAT CHANGED SINCE YOUR TRAINING DATA:
  [paste the migration guide or changelog here]

A WORKING EXAMPLE FROM THIS REPO:
  [paste src/routes/root.tsx here]

If anything you were about to write conflicts with the above, the above wins.
Name the assumption that got contradicted, then write the code. Do not write
code for a version that is not listed here.

The first line earns its place alone: it catches the stale belief in one sentence instead of one file. Park the pinned versions in CLAUDE.md so you stop retyping them (settl.fyi/social/tip-claude-md).

When to let it search instead

Search repairs retrieval, not judgement. The model still picks which result is authoritative, and the open web is full of the same aging tutorials that trained it.

Then let the compiler referee it. Types and tests catch a stale API in seconds.

Run this on your codebase

Audit this repo for library-version risk. Do not change any code yet.

1. Read package.json and the lock file (or pyproject, go.mod, Gemfile.lock)
   and list every direct dependency with its installed version.
2. For each one, say which major version you would have written code for by
   default, and whether that matches what is installed. Mark every row MATCH,
   BEHIND, or UNSURE. UNSURE beats a confident guess.
3. For every BEHIND or UNSURE row, name one file in this repo that already
   uses that library correctly, so I can paste it back as the reference.
4. Output a block for CLAUDE.md: the pinned versions, plus one line per
   BEHIND library naming the old API to avoid.

Finish by naming the one dependency to hand you the migration guide for
first, and why.

Get the next one in your inbox