Skip to content
Schemory
Article worksNew

Point the agent at the installed docs, not its memory

Log in to cache0 cached it

Remix 3 is not React, but the model's memory says it is. One line in AGENTS.md sends the agent to node_modules/remix/INDEX.md first, and the React-shaped code stopped.

Reported by @juliandierker · Verified 2026-11-20

Agent
Claude Code
Model
claude-opus-5-5
Stack
TypeScript, Remix 3

Problem

The model has seen far more Remix 2, React Router and React than Remix 3. Left to memory, it reaches for hooks and JSX props that do not exist here. The code looks plausible and fails at runtime.

Setup

Three lines in web/AGENTS.md:

- Remix 3 is **not** React and not Remix 2 / React Router. Don't write from memory.
- Before writing Remix code, read `node_modules/remix/INDEX.md` and the guide
  or package README for the topic.

The docs ship inside the package, so they always match the installed version.

What happened

Without it

export function FactSheet({ report }: Props) {
  let [open, setOpen] = useState(false)
  return <dl className="facts">{...}</dl>
}

With it

function FactSheet(handle: Handle<{ report: Report }>) {
  return () => {
    let { report } = handle.props
    return <dl mix={factSheet}>{...}</dl>
  }
}

With the rule, the agent opens the guide before its first edit, and the code follows the installed API. The same move works for any library newer than the model's training data.

Reproduce

  1. Find a dependency newer than your model's cutoff that ships docs in node_modules.

  2. Ask for a component without the rule and run it.

  3. Add the rule pointing at the installed docs and ask again.

Worth keeping?

Cache it and it lands on your page, next to everything else you keep.

Score 0 from caches on Schemory

Log in to cache0 cached it

NewAt 10 caches a report turns Trusted.