aliteq.

Your AI forgot how your app works an hour in. That's a context problem, and it's fixable.

It contradicts a decision from earlier, re-breaks something it fixed, renames things you never asked it to rename. It isn't being careless — it can't see the early part of the conversation anymore. Tap the meter, then fix it the way the pros do.

SyntaxUpdated 1h ago7 min readWeb story
Hand-drawn editorial illustration of a long scroll unrolling past a small spotlight that only lights a narrow stretch of it
Share

You've been building for an hour. Early on you told the AI the app uses a certain database, that the buttons should be rounded, that it must never touch the login code. Now it's rewriting the login code, using a different database call, and squaring off your buttons. You didn't change the instructions. It just stopped acting on them. That's a familiar mid-session complaint in vibe coding, and it has a precise cause that you can do something about.

Tap the meter

Working memory (8k tokens)23% full
hidden instructionsyouthe AIa file
  1. The app's hidden instructions~533 tok
  2. package.json + config~1,333 tok

Everything still fits. Keep going and watch what happens when it doesn't.

Token counts are estimates (~3 characters per token); real tokenizers differ by model.

That bar is the model's context window: everything it can see at once, including your messages, its own replies, and the files it has read. A long coding session fills it. When it's full, something has to give, and the oldest material is what goes. The full explanation is in what a context window is and why the AI forgets; this page is about what to do about it.

Why it happens, from the tools' own docs

Two tools, two docs, one cause. Cursor's documentation on rules opens its explanation with: "Large language models don't retain memory between completions." Claude Code's documentation says it just as flatly: "Each Claude Code session begins with a fresh context window." Whatever the model "knew" a minute ago is only whatever the tool puts in front of it this time. If your early instructions aren't in what it can see right now, then as far as the model is concerned they never happened.

That reframes the problem. The AI isn't forgetful in the human sense. It has no memory to lose. What it has is a window onto the conversation, and the window has an edge.

The name for the fix: context engineering

In June 2025, two well-known voices converged on a better name for the skill of managing this. Simon Willison wrote on 27 June 2025: "The term context engineering has recently started to gain traction as a better alternative to prompt engineering." He quoted Shopify CEO Tobi Lütke: "I really like the term 'context engineering' over prompt engineering. It describes the core skill better: the art of providing all the context for the task to be plausibly solvable by the LLM."

Andrej Karpathy added his "+1," saying that in serious AI applications, "context engineering is the delicate art and science of filling the context window with just the right information for the next step." The shift in vocabulary matters for you: it moves the job from phrasing a clever prompt to making sure the model can see what it needs. That's far more tractable for someone who doesn't write code, because it's about organisation, not wizardry.

Three habits that do most of the work

1. Put your standing rules where the tool reads them first. Both tools above have a place for this. Cursor's docs say "Rules provide system-level instructions to Agent" and that "when applied, rule contents are included at the start of the model context." Claude Code's docs describe CLAUDE.md files as "markdown files that give Claude persistent instructions for a project," read "at the start of every session." Same idea twice: a small file of standing instructions that the tool loads at the start every time, so your key decisions are always in the window. The repo behind this site keeps exactly such a file of project rules. If you build in Lovable, Bolt or another builder, check whether your tool has a place for standing project instructions; if it does, that's where "never touch the login code" belongs.

2. Start a fresh conversation for each new task. One endless thread is the fastest way to fill the window with stale material. When you finish a feature, begin a new chat, and paste in only what the new task needs. The new session starts with a clean, relevant window, plus your standing-instructions file.

3. Write decisions down, outside the chat. If a choice matters ("we use this database, passwords are never logged"), it belongs in your notes file, not only in a message that will scroll out of view. Treating a prompt as a short spec, rather than a one-off request, is the same idea from the other direction: prompting is writing a spec, and a reusable one-page version is in spec-driven development for vibe coders.

When it has already gone sideways

If the AI is now patching its own patches, more context rarely helps; starting over with a clean spec beats a fifth fix. And whatever you do, don't skip checking: a model working from a half-empty window is the likeliest to quietly undo something that mattered, so make it check its own work before you trust the result. The bigger picture of shipping is in everything to check before real people use your app.

Quick answers

Why does my AI coding tool forget what I told it?
It has no memory between completions. Cursor's docs say large language models don't retain memory between completions, and Claude Code's say each session starts with a fresh context window. Instructions that have scrolled out of the context window are simply no longer visible to the model.
What is context engineering?
The skill of deciding what information the model can see at each step. Shopify's Tobi Lütke and Andrej Karpathy both backed the term in June 2025 as a better description than prompt engineering. In practice, for a vibe coder, it means keeping standing rules in a file, starting fresh chats, and writing decisions down.
Where do I put instructions the AI should always follow?
In the standing-instructions file your tool reads at the start: Cursor has rules, and Claude Code has CLAUDE.md files, per their docs. In other builders, check your tool's settings for a place for project instructions.
Does a bigger context window fix this?
It helps, but doesn't remove the need to curate what goes in. A larger window still fills up, and more material isn't automatically better. Relevant and recent beats everything at once.

This page has no affiliate links or sponsored placements. The tool descriptions come from Cursor's and Claude Code's own documentation, read on 3 October 2026, and the term's origin comes from Simon Willison's post quoting the original posts; what other builders offer for standing instructions is not asserted here, so check your tool.

Use this in your own page

Teaching this? Paste the live version into your course, blog or answer. Free, no sign-up; the credit line links back here.

Embed
Cite

Found this useful? Share it

Share
Syntax

Build Editor

Syntax

I explain what's actually happening when you build software by talking to an AI — what the model is doing, what's really running your app, and where the sharp edges are. No jargon without a picture, no hype, and an honest 'hire someone' when that's the answer.

The Aliteq brief

The tech worth knowing — hardware, AI, gaming, deals. No spam, unsubscribe anytime.

Keep reading