“It works in my context window” is the AI version of the oldest excuse in software: “it works on my machine”. The code passed, but only in a situation nobody else can reproduce. Here the situation is the model’s context window, and it is 97% full.
Our shirt shows a terminal with the tests passing and a context bar at 97%. The model is confident. Nobody knows what already fell out of the window.
What a context window is
A context window is the amount of text a language model can read at once, measured in tokens. A token is a piece of a word: a few characters of English or part of a line of code. Everything the model uses for an answer must fit in that window: the system prompt, your messages, the files it opened, the tool output and its own previous replies.
When a coding agent works for a long time, the window fills up. Tools then drop or summarise older parts of the conversation. Claude Code, for example, has a /compact command that replaces the history with a summary. The model keeps working, but some details are now gone or compressed.
Why a bigger window is not the full answer
Models do not use every part of a long context equally. In Lost in the Middle: How Language Models Use Long Contexts (Liu et al., 2023), researchers found that performance is often highest when the relevant information is at the start or the end of the input, and drops when it is in the middle. They also saw performance fall as inputs got longer, even for models built for long contexts.
So the joke has a real basis. A fact you gave the model two hours ago may still be inside the window and still be ignored.
How it maps to “works on my machine”
| Works on my machine | Works in my context window |
|---|---|
| Depends on a local config nobody committed | Depends on a conversation nobody saved |
| Fails on the CI server | Fails in a fresh session |
| “Did you install the right version?” | “Did you paste the file again?” |
| Fix: Docker, lock files, CI | Fix: written specs, tests, small sessions |
How to keep it working outside the window
- Put decisions in files, not in chat: a README, a spec or a project instructions file the agent reads at the start.
- Keep sessions short and focused on one task. Start a new one when the topic changes.
- Let tests be the memory. A test still fails tomorrow, even if the model forgot why it exists.
- After a long session, review the full diff, not only the last change.
If the code works and you cannot explain why, you are close to the “it works, why?” meme. If you accepted it without reading, that is vibe coding.
Get the shirt

It Works in My Context Window T-Shirt · 24 €
Tests pass. Context at 97%. Ship it?

It Works, Why? Developer T-Shirt · 24 €
The pre-AI version of the same feeling.

Senior Prompt Engineer T-Shirt · 24 €
For the person who writes the prompts.
All shirts are unisex, S to 5XL, printed on demand in black, graphite heather and white. Check the size guide before ordering. More ideas in the Christmas gift guide for programmers.
FAQ
What does “context window” mean in AI?
It is the maximum amount of text, in tokens, that a language model can take into account at one time. Text outside the window does not exist for the model.
What happens when the context window is full?
The tool must drop or summarise older content. The model can then lose details, such as an earlier instruction or a file it read.
Where does “works on my machine” come from?
It is a long-standing developer excuse for code that runs on one computer and fails everywhere else. Containers and CI pipelines exist partly to make it impossible.