The 'Context Window' Illusion: Why Your AI Agent Needs a Filesystem, Not More Tokens
TL;DR
- The largest context window still empties every prompt cycle; a persistent filesystem, like the /root directory on an xShellz Agent Shell box, keeps project state on disk so your AI agent never forgets.
- Running
borg learnwrites a BORG.md file that captures your entire project structure as filesystem state, not as expensive prompt tokens, so the agent reloads its context instantly on restart.- A single
ssh -p <port> root@<host>command connects you to an always-on Ubuntu 24.04 box with 6 preinstalled coding agents, Node 22, Python 3, and no idle timeout, even on the free plan.
Why does my AI agent keep forgetting my project structure even with a huge context window? Because the agent’s entire world resets every time you start a new session. No matter how many tokens you cram into a prompt, that window is ephemeral. It vanishes the moment the LLM finishes a response. To remember your project structure, an agent needs a persistent filesystem where it can write notes, metadata, and context files that survive every restart. That is exactly what an xShellz Agent Shell box provides: a real /root directory that sticks around, even when you close your laptop. We build and operate the xShellz fleet, including borg and Agent Shell boxes, so the setup we describe here is exactly what we run in production ourselves.
why does my AI agent keep forgetting my project structure even with a huge context window?
Because the context window is wiped after every turn. The LLM has no memory of any prior output once the current prompt ends. Your agent might have spent 100,000 tokens mapping out your directories during its last run, but the next time you call it, all that work is gone unless it was saved somewhere durable. A huge context window lets the model juggle more stuff in one go, but it doesn't provide storage. The only way to keep that mental map is to persist it on a real filesystem, like the /root directory on an xShellz Agent Shell box, which never evaporates between sessions.
why is context window size not enough for AI coding agents?
Context windows are like short-term memory: they hold a lot, but they can't protect it from a power cycle. Even the largest models forget everything the moment the response finishes. For coding agents that need to track file trees, linting results, test outputs, and previous edits across many turns, relying on prompt-only memory forces you to re-inject that state every time. This is slow, expensive, and fragile. A filesystem, on the other hand, stores state as actual files: a project map like BORG.md, logs, and checkpoints. When your agent restarts, it simply reads those files. That's how your own brain works too; you don't reload your entire memory every morning by re‑reading a journal.
how to give an AI agent a persistent filesystem
The quickest way is to run your agent on a remote Linux box that never shuts down. An xShellz Agent Shell box gives you root (safely sandboxed via gVisor) and a /root directory that is the only part of the filesystem that survives a rebuild. Install any coding agent you like: borg, Claude Code, Codex, and others are all preinstalled. Then use borg learn to scan your repository and produce a BORG.md file. That file becomes the agent's durable memory. For example, on an xShellz.box, you'd run:
ssh -p <port> root@<host>
cd my-project
borg learn
The resulting BORG.md lives in /root/my-project and everything the agent learns about the project layout is saved there. Even after you disconnect and reconnect, the agent can pick up right where it left off because the file is still on disk.
can I use a remote linux box as an AI agent's memory?
Yes, and that's the whole idea behind xShellz Agent Shell boxes. Each box is an always-on Ubuntu 24.04 machine with a persistent /root home directory. You can write any file you need and it stays there until you delete it, no matter how many times you log in and out. That means your agent can write a BORG.md, store debugging notes, cache dependencies, or even keep a running tmux session with IRC clients like znc, eggdrop, or irssi. Since the box includes 6 preinstalled coding agent CLIs and Node 22 plus Python 3, you never waste time installing tooling. Connect once, and your agent gets a real filesystem with state that outlasts any prompt.
what is the difference between prompt context and filesystem state?
Prompt context is what the LLM "sees" in the current conversation turn; it's volatile and lost after output generation. Filesystem state is data stored on disk, like a BORG.md file, logfiles, or even the contents of your git repo. The agent can read filesystem state at any time without including it in the prompt, or it can selectively load only what's needed. This separation means you don't waste expensive context tokens on stale information, and you can accumulate knowledge across hundreds of sessions. Prompt context is scratch paper; filesystem state is a filing cabinet. A coding agent that can write and read files can keep its project understanding indefinitely.
Frequently asked questions
Does the persistent filesystem survive if I restart or rebuild my xShellz.box?
Yes. The /root directory is designed to persist across rebuilds; only the rest of the filesystem is ephemeral and resets when a box is rebuilt on a newer image.
Can I use multiple agents on the same box and share the filesystem state?
Absolutely. All preinstalled agents (borg, Claude Code, Codex, Gemini CLI, opencode, pi) can access /root. You can even run them simultaneously in different tmux windows, reading and writing the same project files.
How does borg's learn command differ from feeding the entire codebase into the prompt?
borg learn extracts only the structure and important context, generating a BORG.md that the agent loads quickly without consuming millions of tokens. It's a summary, not a full dump, so you can keep context windows tight.