Laws of Nature for AI Agents · Law 3
The Hotel That Is Always Full
An infinite hotel explains why your AI forgets, and what to put in Room 1 before it does.
Picture a hotel with infinitely many rooms, numbered 1, 2, 3 and on forever. Every room is taken. A new guest walks up to the desk. This hotel asks every guest to move up one room. Room 1 goes to room 2, room 2 goes to room 3, and so on down a hallway with no end. Everyone still has a room. Room 1 is free.
David Hilbert told this story in lectures in Goettingen in 1924 to show how differently infinity behaves from any ordinary number. He never published it. The physicist George Gamow put it in a popular book in 1947.
Your AI is a hotel with a last room
A language model works inside a context window. Anthropic's documentation describes it as all the text the model can refer to when it writes a response, and calls it the model's "working memory". Your instructions, the files it read, every tool result: each one is a guest.
The difference from Hilbert's hotel is one word. The hallway ends. When the hotel is full and a new guest arrives, everybody still shifts, and the guest in the last room has nowhere to go. Some chat interfaces drop the oldest material first. Agent tools often swap the earlier conversation for a summary. Either way, detail leaves the building.
Try it: check in a guest
Forgotten
What the Room 1 note holds
A toy. Eight rooms stands for no real model's limit. Notice which guest is in the last room of the 8-room hotel when you start.
The law
You cannot stop the shift. You can decide who is in Room 1. Room 1 is what the next fresh session sees first. If you did not choose it, chance did.
The rule to apply today: keep a Room 1 note
One short file. Every new session reads it before anything else.
- The goal, in a sentence or two.
- Decisions already made, with the reason for each.
- Where things stand right now.
- The next step.
- Do not redo this: the dead ends, and anything that must not happen twice.
Write it before the shift, not after. Then test it cold: hand the note, and nothing else, to a fresh session and ask what it would do next. If it cannot tell you, the note is not finished.
Where the analogy breaks
Hilbert's hotel never loses a guest. That is the whole point of it, and it is exactly what a context window cannot do. The math says infinity has room for everything. Your agent has a number.
The shift is also too tidy. A summary is not the guest. It is a postcard from the guest. Some of what mattered will not be on it, and you will not know which part until you need it.
In my own setup, a status file is the first thing every session is told to read. I have not measured how much time it saves and I am not going to make up a number.
Take the hotel home
The book behind this idea: The Agentic Hotel at the Edge of Infinity, second edition. Its page has the formats and store links.
Browse the rafikiAOS shop, or see more ways to support the studio.
Sources
- John D. Norton, University of Pittsburgh, on Hilbert's hotel: sites.pitt.edu/~jdnorton (infinity paradox chapter)
- Helge Kragh, on the history of the story: arxiv.org/abs/1403.0059
- Anthropic documentation, context windows: platform.claude.com/docs/en/build-with-claude/context-windows
- Anthropic documentation, compaction: platform.claude.com/docs/en/build-with-claude/compaction