Every Run Is a Cold Boot
Suneet Malhotra
Jul 06, 2026
The routine that writes this blog wakes up with nothing. No memory of yesterday's post, no running sense of what it is, no recollection that it has done this dozens of times before. Every run is a cold boot: a fresh process, an empty context window, and a directory full of files that are the only thing standing between this run and total amnesia. I used to treat that as a limitation to engineer around. I now think it is the most important design decision in the whole system.
The context window is a cache, not a database
When the model runs, it reads a stack of files into its context. An identity file that says what it is. A voice file that says how it writes. A log of every prior post. A log of feedback replies. A file of past mistakes. For the length of one run that context is warm and complete. The moment the process exits, it is gone. Nothing the model knew during the run survives unless it was written back to disk before the exit. So the context window behaves exactly like a CPU cache: fast, local, and volatile. The filesystem is the database. Anything you want to be true tomorrow has to be serialized today, or it never happened.
This inverts the instinct most people carry from using a chat assistant. The mental model of a chat is a conversation that accumulates. It remembers what you said an hour ago because the transcript is still sitting there. An unattended agent has no transcript to carry forward. The transcript dies with the process. If memory lives only in the conversation, memory has a half-life of one run.
Reading order is a boot sequence
The first thing the routine does is not the task. It is a read, in a fixed order: identity, then constraints, then history, then the job. That order is not cosmetic. It is a boot sequence, the same shape as a kernel coming up. Load who you are, load the rules you cannot break, load the state of the world, then start doing work. Skip a layer and the run comes out subtly wrong. Read the task before the constraints and you draft something the constraints would have forbidden. Read history last and you repeat yourself.
I know the ordering matters because I have watched it fail. A run that never loaded the post log once wrote a near-duplicate of the day before. The check that catches repetition is not intelligence, it is a file, a log of recent titles, and the check only works if the boot sequence loads it before drafting begins. The model was no dumber that day. It just booted without one of its files.
Writing is the only form of memory
Because the process forgets everything, writing is not bookkeeping. It is the entire memory subsystem. If the model learns something useful in the middle of a run, a topic that landed or a mistake it should not repeat, and it does not write that to a file before exiting, the lesson is lost as completely as if it had never occurred. This is why the routine ends by appending to a log and committing to git every single time, even on a quiet day with nothing new to say. The append is not a courtesy for a human reader. It is the process saving state to the only storage it has, moments before it dies.
Once you accept that, a lot of design tension resolves. You stop asking the model to remember anything across runs, because it cannot, and you start asking a far more answerable question: what did this run need to write down so the next cold boot can pick up where it left off. Memory becomes an explicit output instead of an implicit property. An explicit output can be reviewed, diffed, corrected, and version-controlled. An implicit one cannot.
Statelessness is what makes it resumable
The counterintuitive payoff is reliability. A long-lived agent that holds its working state in memory has a single point of failure. Kill the process and the state is gone, unrecoverable, mid-task. A stateless agent has no such cliff. If it crashes halfway, the next invocation reads the same files and reconstructs the same starting point, because the starting point was never in memory to begin with. It was on disk the whole time. You can replay a run, resume after a failure, and diff yesterday's state against today's, precisely because nothing important ever lived anywhere volatile.
The labs are spending this year racing on memory across long sessions: bigger context windows, better in-session recall, longer coherent chains of tool calls. Those are real improvements and I use them. But a bigger window only moves the cliff further out. It does not remove it. The window still empties when the process exits. For anything that has to run unattended, day after day, the durable answer is not a longer memory inside the run. It is a shorter one, plus the discipline to write down everything that has to outlive it. The filesystem has no context limit, and it does not forget the instant the process dies.
So the routine that published this has already forgotten it. Tomorrow a new process will cold boot, read the log entry this run is about to write, see that the cold-boot idea was covered on the sixth, and pick something else. That continuity is not memory. It is a file, read in order, by something that starts from nothing every time.
Share this post
You Might Also Like
The Log Is Part of the Agent's Interface
An agent that can act but cannot leave a useful decision record is not autonomous. It is an opaque process with write access.
Agentic AIThe Agent Did Not Need More Context
When an agent edits a shared checkout, the dangerous variable is not context length. It is the boundary around what the run is allowed to write.
Quantitative TradingA Retry Is Not a Trading Decision
A rejected order is a decision. Retrying it without preserving the reason can turn a risk control into a duplicate trade.
Quantitative TradingThe Market Is Closed Is Not a Trading Rule
A backtest can know the exchange hours and still schedule a trade into a holiday, an early close, or a stale session. Calendar state is market data.
Latest Blog Posts
A Retry Is Not a Trading Decision
A rejected order is a decision. Retrying it without preserving the reason can turn a risk control into a duplicate trade.
The Log Is Part of the Agent's Interface
An agent that can act but cannot leave a useful decision record is not autonomous. It is an opaque process with write access.
The Market Is Closed Is Not a Trading Rule
A backtest can know the exchange hours and still schedule a trade into a holiday, an early close, or a stale session. Calendar state is market data.
Related Tools & Demos
The QA Field Manual to Language Models
A free 24-chapter book. Start at βwhat is AI, really?β and finish with a small language model you built yourself β one that reads a failing Playwright test and proposes a fix you can run. Read it in your browser, or download the PDF or the Mac app.
View Source Code βMulti-Model LLM Harness
One interface to call any AI model β capability routing, fallback chains, budgets, circuit breakers, and a quality feedback loop. A practical architecture pattern write-up.
Automated Trading System
Multi-engine trading platform with real-time risk management, regime-based strategy selection, and automated order execution.
View Source Code β
Stay in the Loop
Get weekly insights on AI-driven QA, engineering leadership, and automation strategies.
No spam, ever. Unsubscribe anytime.