You spend an hour working with an AI agent. It learns your project structure, your naming conventions, your decision history. Then you close the session. Tomorrow, it knows nothing. This is the default state of every AI tool, and it's the first problem you need to solve.

The reason is architectural. Large language models are stateless. Each conversation is a clean slate with no memory of previous interactions. The context window (the amount of text the model can process at once) is the only "memory" it has, and it resets completely between sessions.

Some tools partially address this. ChatGPT has "Memory." Claude has "Projects." These store snippets of context. But they're limited in capacity, opaque in what they store, and impossible to audit. You can't see exactly what the AI remembers. You can't control it. And the stored context is a thin summary, not a complete record.

For casual use, that's fine. For running a business, it's not.

The Session Logging Pattern

The fix is surprisingly simple: write things down. Not in a database. Not in a vector store. In files, on disk, that the AI can read at the start of the next session.

The pattern has two phases:

Phase 1: Log as you go. During every work session, the AI writes a timestamped entry to a temporary log file. Each entry captures what was done, what was decided, and what's outstanding. This happens in real-time, as work is completed, not as a summary at the end.

Phase 2: Consolidate. A consolidation agent reads all temp logs and merges them into each project's official session log. The temp logs are archived. The official logs become the canonical record.

Why two phases? Because logging during a work session needs to be frictionless: fast, append-only, no formatting overhead. The official session log needs to be organized, deduplicated, and structured for future reference. Separating capture from curation keeps both fast.

The Benefits of Markdown

When engineers hear "session persistence," they think databases, vector embeddings, RAG pipelines. These work, but they introduce complexity that creates its own failure modes.

Files have three advantages:

Inspectable. You can open the file and read exactly what the AI will read. No black box. No wondering "does it remember X?" Just open the session log and check. If something is wrong, you edit the file directly.

Portable. Files work on every operating system, with every AI tool, with no infrastructure. No database to maintain, no embeddings to reindex, no vector store to pay for. Move the folder to a new machine and everything comes with it.

Versionable. Files go into git. You get change history, diffs, and the ability to revert. If the AI writes something wrong to a session log, you can see exactly when it happened and roll it back. Try doing that with a vector database.

Files work on every operating system, with every AI tool, with no infrastructure. Move the folder to a new machine and everything comes with it.

The tradeoff is search performance. A 50-page session log is slower to scan than a vector query. But for business operations, where the relevant context is usually in the last 2-3 sessions, sequential file reading is fast enough.

The Architecture

Three pieces hold the system together: a fast capture path that writes during the session, a consolidation step that merges and organizes after, and a load-on-startup hook that puts the right context in front of the AI before the next session begins. Skip any one of them and the loop breaks.

The naming convention matters more than the structure. Get the file names wrong and you'll collide on multi-operator workspaces, lose project boundaries when consolidating, and end up with logs the next session can't reliably find.

Phase 1: Capture Log as you go temp-logs/{project}-{date}.md TEMP LOGS ecommerce-02-23.md consulting-02-23.md personal-02-23.md Phase 2: Consolidate Merge into official logs {project}-session-log.md
Two-phase logging: fast capture during work, organized consolidation into official logs

What Gets Logged

Not everything deserves a log entry. The rule is: log what a future session would need to know.

Things that get logged:

  • Decisions made and the reasoning behind them
  • Tasks completed with enough detail to verify later
  • Blockers encountered and their current status
  • Configuration changes (settings, integrations, credentials)
  • Metrics reviewed and their takeaways

Things that don't get logged:

  • Exploratory conversations that didn't lead to decisions
  • Trivial fixes (typos, formatting)
  • Research that was inconclusive

The signal-to-noise ratio matters. A session log bloated with irrelevant entries is worse than a sparse one, because it wastes context window space when the AI reads it in the next session.

The logging test: Before writing a log entry, ask: "Would a future session need to know this?" If the answer is no, skip it. Sparse, decision-focused logs outperform verbose ones every time.

The Continuity Effect

Once session logging is in place, something shifts. The AI stops feeling like a new hire every morning and starts feeling like a colleague who was in the meeting yesterday.

When you start a session, the AI reads the project's session log and immediately knows:

  • What you worked on last time
  • What decisions were made and why
  • What's still outstanding
  • What blockers need attention

You don't explain any of this. It's just there, in the files, loaded automatically. The conversation starts at "what should we focus on today?" instead of "let me tell you about my business."

The AI stops feeling like a new hire every morning and starts feeling like a colleague who was in the meeting yesterday.

The AI forgets between sessions because it has nowhere to remember. Give it somewhere, and the forgetting stops. The architecture is simple. The discipline of doing it every day is what makes it work.