·4 min read

Why Claude Code, Cursor, and Codex keep forgetting your codebase

AI coding agents don't have a memory problem because the models are dumb. They have it because nobody gave them a place to remember.

It's not the model. It's the protocol.

You've probably had this conversation with your AI coding agent more than once:

Use the auth service we already built, not Supabase auth directly.
Yes, but call getCurrentTenant() first — users can be in multiple workspaces.
No, we migrated off that pattern last quarter.

By the third correction, you're not coding with an agent. You're a context shovel. You spend more time briefing the agent than the change would have taken to write yourself.

And tomorrow, you'll do it again.

The memory problem isn't a model problem

The instinct is to blame the LLM. "Claude is dumb today." "Cursor's autocomplete got worse." "GPT-5 hallucinated a function that doesn't exist."

Usually it isn't.

The model is fine. It's working from incomplete information — and you keep being the only source of complete information. Three things create the gap:

  • Context windows are finite. Claude Code, Cursor, and Codex all read your repo, but none of them read all of it on every request. They sample. They retrieve. They guess. The bigger your codebase, the more guessing.
  • Sessions don't persist. Close the tab, open a new one, and the agent forgets the conventions you taught it five minutes ago. Every conversation starts at zero.
  • Tribal knowledge isn't in the repo. Why did you migrate off the old auth pattern? Why does processOrder ignore drafts? The reason lives in a Slack thread from October. The agent will never read it.

The cost compounds

In a side project, you correct the agent and move on. Annoying, but fine.

In a real team, the cost stacks:

  • New hires re-ask the same questions seniors answered last quarter — now to the agent, on every PR.
  • Three engineers prompt the same agent and get three different opinions about which auth pattern to use.
  • The agent confidently rewrites a function that exists for a reason nobody documented.
  • Senior devs spend more time briefing junior devs' agents than mentoring junior devs.

You hired smart people. Their agents are working from a partial map.

What "remembering" actually looks like

The fix isn't a smarter model. It's giving every model — Claude, Cursor, Codex, whatever ships next — a shared layer of context they can all read.

In practice, that means:

  • Briefs the agent reads at the start of every session, not docs that get forgotten in Notion.
  • Walkthroughs that capture the why***, not just what the code does.
  • Queryable from the CLI, so the agent (and the human) can pull context on demand instead of re-deriving it.
  • Persistent across sessions and across tools, so switching from Cursor to Claude Code doesn't reset what your team has already taught it.

Your agent doesn't need a better brain. It needs the same onboarding doc your last hire got — except it has to read it every single time.

The shape of the fix

Call it what you want — a memory layer, a context store, an agent-native wiki. The job is the same: capture team knowledge once, in a format humans skim and agents ingest, and make it the first thing every coding session pulls from.

If you build this yourself, you'll end up with some combination of: an AGENTS.md file, a folder of markdown briefs, a CLI that fetches them on demand, and a process for keeping them current. That's roughly what Brifly is. Record a walkthrough, generate a brief, query it from the CLI — and Cursor, Claude Code, and Codex all read from the same source.

The tool matters less than the discipline. Build it yourself. Use Brifly. Paste briefs into the system prompt manually. Pick whichever you'll actually maintain.

The takeaway

Your agent isn't getting dumber. Your codebase is getting bigger and your context is staying in your head.

Fix the protocol, not the model.

Plan together. Delegate to agents. See what happened.

The workspace where your team aligns on what to build, hands it to AI coding agents, and keeps everyone in the loop. Works with Claude Code, Cursor, and Codex.

Try Brifly free

Keep reading