hackhaton-space-stackHackhaton Space Stack
AcademyBuilder
Get Started
All terms
The Basics
  • Stack
  • Frontend & Backend
  • CLI
  • Monorepo
  • Server
  • Localhost
How AI Works
  • Context Window
  • Hallucination
  • Token
  • Prompt Caching
  • Session
  • Compaction
  • Embedding
  • Vector Database
  • RAG
  • Fine-tuning
  • Temperature
  • Inference
  • Reasoning
  • Multimodal
Building With AI
  • Agent
  • MCP
  • System Prompt
  • Skill
  • CLAUDE.md
  • Slash Command
  • Harness
  • Computer Use
  • Agents SDK
  • Voice Agents
  • OAuth
  • Vibe Coding
  • Permission Scope
  • Tool Calling
  • Prompt Injection
  • Eval
  • Guardrails
  • Sandbox
  • Progressive Disclosure
Code & Collaboration
  • Git
  • Commit
  • Branch
  • GitHub
  • Pull Request
  • Open Source
  • Markdown
  • Dependency
  • Merge
  • Fork
APIs & Connections
  • API
  • Auth
  • Database
  • ORM
  • SDK
  • Webhook
  • Endpoint
  • REST
  • HTTP Methods
  • Env File
  • Schema
  • JSON
  • YAML
  • Secret
  • Rate Limit
  • CORS
  • Cookie
  • Encryption
Shipping & Running
  • Deploy
  • Headless
  • Cron
  • DNS
  • CDN
  • Object Storage
  • Serverless
  • Edge
  • Worker
  • Runtime
  • Process
  • Daemon
  • Queue
  • Job
  • State
  • Cache
  • SSH
  • Build
  • Staging
  • Rollback
  • Docker
  • Feature Flag
  • Test
  • CI/CD
  • The Cloud
Debugging & Errors
  • Trace
  • Type Error
  • Stack Trace
  • Log
  • Bug
  • Patch
  • Latency
How Developers Think
  • DRY
  • YAGNI
  • KISS
  • Refactoring
  • Technical Debt
  • Async
← All terms

Type-safe, modern TypeScript scaffolding for full-stack web development

ThreadsGitHub

Info

  • Academy
  • Docs

Legal

  • Terms of Service
  • Privacy Policy

© 2026 Dzulhelmy Nazri

How AI Works

$definecontext-window--plain-english

Context Window

TLDRHow much your AI can hold in mind at once.

AI does not have memory. It has a room.

You are three hours into one chat, scaffolding from the builder, pasting errors, uploading files. The agent starts contradicting itself. Forgetting the stack you picked ten messages ago. You assume it broke.

It did not. You became a hoarder.

Everything you give a model has to fit in one room, all at once. Your latest message. The whole thread so far. Any files you attached. The hidden instructions — "you are a coding assistant, today is…" — plus whatever lives in a project rules file or a skill.

All of it stacked in the same room. The context window is just how big that room is, measured in tokens.

Every time you hit send, the model re-reads the entire room from scratch. It is not remembering the way a person does. It is reading every page again, top to bottom, every single turn.

Different models hand you different-sized rooms, and the spread is enormous. A small window is a studio apartment — fine for a quick question. A frontier model is a mansion — hundreds of thousands of tokens, enough pages to bury a desk. The numbers climb every few months. Do not memorize them. Remember the shape: some rooms are ten times bigger than others, and none of them are infinite.

That sounds like unlimited space. It is not. Bigger is not automatically better. A mansion packed wall to wall with junk is still a mansion you cannot find anything in. Cram the room full and the model loses track of what is where, even though it all technically fits. That is why a long, sprawling chat slowly feels dumber than a fresh one. You have not broken anything. The room got cluttered.

When you say "but I told you this an hour ago" and it stares back blankly, that is not amnesia. The room filled up. Early pages got pushed toward the door to make space for the new ones. You are expecting someone to find one receipt in a library that has not been shelved.

Once you see the room, you stop fighting it.

  • Start fresh chats when the topic changes. New room, clean floor.
  • Use compaction when the host offers it — a summary on the desk instead of every old turn.
  • Put facts in files the agent can reopen, not in a joke from Tuesday.
  • Lean on prompt caching for the stuff that never moves — system instructions, big docs you send every time.

The window is the desk, not the library. Keep the desk readable.

Related

  • Token
  • Compaction
  • Session
  • Prompt Caching
PrevLocalhost

How AI Works

NextHallucination