How AI coding actually works.
Everything that happens between your prompt and the code that appears. The mental model that separates vibe coders who ship from vibe coders who get stuck.
The model — what it is and isn't
A model is a giant pile of numbers trained to predict the next word. It has no memory, no tools, no agency. It reads what you give it, generates one token at a time, and stops. Everything you experience as "intelligence" is built around it, not inside it.
Tokens and the context window
Every word you type gets chopped into tokens — roughly word-sized chunks the model can process. The context window is the total amount of tokens the model can see at once. Think of it as the model's working memory. Everything — your prompt, the system instructions, the file contents, the conversation history — has to fit inside this window or the model literally cannot see it.
The harness — what makes it an agent
A model alone can't do anything useful. The harness is everything built around it — the system prompt, the tools, the permission system, the context management. Cursor is a harness. Lovable is a harness. Claude Code is a harness. The model is the engine; the harness is the car.
Tools and the environment
Tools are how the agent actually does things beyond generating text. Reading files, writing code, running terminal commands, searching the web — these are all tools the harness exposes. The environment is everything the agent acts on: your filesystem, your browser preview, your database.
Where things go wrong
Every AI coding frustration traces back to a small set of failure modes. Once you can name them, you stop blaming the tool and start working around the actual limitation. This section will save you more time than any other.
Sessions, memory, and staying sharp
The model is stateless — it carries nothing forward between requests except what's in the context window. Sessions give you the illusion of continuity, but they're really just an accumulating context window. Understanding this changes how you structure your work.
Patterns of work — how you actually build
These aren't theoretical categories. They're the working modes you switch between daily. Knowing which one you're in — and when to switch — is the highest-leverage skill in AI coding.