Rapkyn · 4 April 2026 · AI Agents

Why Your AI Agent Keeps Starting From Scratch — And How to Fix It

You spent an afternoon setting up your AI agent. Gave it tools. Connected it to your calendar. Explained what you're working on. Had a solid first conversation.

Then you opened a new session the next morning and it had no idea who you were.

This is the most common frustration in AI agent setups, and it has a specific name: session amnesia. The good news is that it's a configuration problem, not a model problem. The fix takes about 30 minutes and you only do it once.

Why This Happens

Most AI models don't maintain persistent memory between sessions by design. Each conversation starts with a blank context window. Anything from the previous session — your name, your preferences, what you're working on — is gone unless it was explicitly loaded back in.

Chat interfaces like ChatGPT hide this by storing your conversation history and optionally injecting it into new sessions. When you build your own agent setup (particularly with tools like OpenClaw), you're responsible for building the memory system yourself.

If you haven't built it, the agent isn't broken — it just has no mechanism to remember things. You're having the same first conversation over and over.

The Three-File Fix

Persistent agent memory requires three things working together:

  1. A curated memory file the agent reads at session start
  2. A daily notes file the agent writes to during each session
  3. Session startup instructions that tell the agent to load both

In OpenClaw, these are MEMORY.md, memory/YYYY-MM-DD.md, and the session startup section of AGENTS.md. Here's how each one works.

Step 1: Create MEMORY.md

This is the agent's long-term memory — the curated facts it should always know. Keep it short (under 100 lines) and factual. Things like:

## People
- **Matt** — my operator. Founder of Orion Ground Control. Prefers direct responses.
- **Raymond** — co-founder, investment strategy focus.

## Active Projects
- aussieclaw.ai — AI agent guide business. $500/month target.
- nevermissacall.trade — call tracking SaaS. Early stage.

## Preferences
- Timezone: Perth, Australia (AWST, UTC+8)
- Communication: Telegram
- Code: Python or Node.js, local-first tools where possible

This isn't a transcript of everything you've ever discussed — it's a distilled summary of what the agent needs to know to function. You write the first version manually, then the agent maintains it over time.

Step 2: Set Up Daily Notes

Create a memory/ directory in your workspace. Each day gets its own file: memory/2026-04-04.md. The agent writes to this file during sessions — logging decisions, tasks completed, things to follow up on.

These daily files are the agent's raw working memory. They don't need to be tidy. They just need to exist and be written to.

Step 3: Fix AGENTS.md

This is the step most people miss. Having memory files isn't enough — you need to tell the agent to read them at the start of every session. In your AGENTS.md (or system prompt, depending on your setup), add a session startup section:

## Session Startup

Before doing anything else:
1. Read MEMORY.md — your long-term facts
2. Read memory/YYYY-MM-DD.md for today (and yesterday if it exists)
3. Check STATUS.md if it exists — current project state

Don't ask permission. Just do it.

The instruction "don't ask permission" matters. Without it, some agents will ask "should I read your memory files?" at session start — which defeats the purpose.

What Changes After the Fix

Before: Every session, the agent asks for your name, your timezone, what project you're working on. You give the same context every time. The agent never improves because it never accumulates anything.

After: The agent opens a session, reads your memory files silently, and starts from where you left off. Within a few weeks, it knows your patterns well enough to surface relevant context without being asked.

The improvement compounds. Each session adds to the daily notes. Periodically, the agent reviews the daily notes and distils what's worth keeping into MEMORY.md. The more sessions you have, the better the context becomes.

Common Mistakes to Avoid

Testing That It Works

After setting this up, start a fresh session and immediately ask: "What do you know about me?" The answer tells you exactly what made it into the context and what didn't. If the answer is close to blank, the files aren't being loaded. Check your AGENTS.md session startup instructions.

Ask a follow-up: "What did we work on yesterday?" If it can answer accurately from the daily notes, the memory system is working.

If either answer is wrong or incomplete, that's your diagnostic — something in the load chain is broken. Usually it's missing instructions, wrong file path, or a MEMORY.md that's too large to load reliably.

The Bigger Picture

Session amnesia is the most visible symptom, but memory architecture issues often show up in subtler ways: the agent defaulting to generic advice instead of advice tailored to your situation, missing context about ongoing projects, failing to connect dots between things you've discussed in different sessions.

All of these trace back to the same root cause: the agent doesn't have the context it needs to do good work. The three-file fix above solves the obvious version. If you're still seeing context issues after that, the problem is usually what's in the memory files — not whether they exist.

Getting that right is harder. It requires knowing what the agent actually needs to know, keeping it current, and trimming what's stale. That's the configuration debt that builds up in real agent setups.

Want someone to look at your setup?

If your agent has been running for a few weeks and something still feels off — context slipping, inconsistent outputs, not surfacing things proactively — the Agent Audit is a one-off review of your actual config files. Detailed findings within 48 hours.

Learn About the Agent Audit →