Memory: Workspace Files That Do the Remembering
Bots forget; files don't. The file layout most long-running bots converge on.
“Remember this” is the most expensive sentence in bot-building. Conversational memory drifts, gets summarized away, and can’t be audited. The bots that keep working for months remember with files: plain markdown in a workspace, re-read every run, editable by both of you.
The four-file layout
Long-running bots keep converging on the same shelf:
/workspace
role.md — who this bot is, its rules and boundaries
config.md — what to watch, thresholds, preferences
log.md — what has been handled (the seen-log)
fixes.md — incidents and their fixes
- role.md is the constitution. Short (≤20 lines), stable, referenced by every run.
- config.md is the data. The bot can propose changes; you approve them.
- log.md is memory of events — append-heavy, pruned monthly.
- fixes.md is memory of mistakes. The cheapest prompt improvement you’ll ever get is a bot that re-reads its own incident history.
Why files beat memory
Auditable. You can open log.md and see exactly what the bot did. Try that with a context window.
Editable. Fix a bad preference by editing one line — no negotiation.
Portable. Copy the four files into a new bot and it inherits everything that matters. People migrate bots like hermit crabs this way.
Bounded. A file has a size you can see. Context has a limit you can’t — and hitting it silently is how routines die.
Patterns that make files work
Read at start, write at end.
At the start of every run, re-read role.md, config.md, and log.md. Update log.md before you report to me.
The log entry format. Fixed and minimal, so pruning stays possible: id | title | date | one-line result.
Propose, don’t silently rewrite.
If you believe config.md is wrong, propose a change and wait for my OK. Never edit config.md on your own.
Prune on schedule. Logs grow until they’re noise. Monthly: “list log entries older than 90 days and propose archiving them.”
The failure modes
- The unread file. The prompt mentions config.md but the bot “remembers” its contents from last week. Fix: the read-at-start rule, verbatim.
- The silent fork. Two bots maintain their own copies of the same list; the copies diverge. Fix: one owner per file; everyone else reads.
- The novel. log.md becomes an archive nobody reads. Fix: the current log stays small; old entries move to archive-2026.md.
Files are also what make routines safe to hand tools: the bot’s view of the world lives where you can inspect it — not in a summary you have to take on faith.