SOUL.md rules drift in long AI agent sessions and how to fix it

✍️ OpenClawRadar📅 Published: April 14, 2026🔗 Source
SOUL.md rules drift in long AI agent sessions and how to fix it
Ad

If your SOUL.md rules work perfectly for the first 10-15 messages but get ignored later in a session, the system isn't broken—your session has outgrown it. This happens because SOUL.md loads once at session start as part of the system prompt, but as conversation context grows (thousands of tokens by message 20), the model pays more attention to recent message patterns than to the initial prompt.

Why SOUL.md rules drift in long sessions

At message 1, SOUL.md is the loudest voice in the room. The model reads and follows it closely. Rules like "never say absolutely," "match my tone," and "be direct, no filler" work perfectly. By message 20-30, the agent starts drifting—"absolutely" creeps back in, responses get longer, filler returns. The SOUL.md is technically still there but gets drowned out by everything that came after.

Think of it like a job description given on day one. By week 3, the employee isn't re-reading it every morning—they're doing what feels right based on recent patterns. If the last 10 conversations were long and detailed, the agent defaults to long and detailed even if SOUL.md said "be brief."

The primary fix: use /new aggressively

This solves 80% of the problem and costs nothing. Most people treat /new as a last resort when things break. Instead, use it constantly before every distinct task:

  • Research? /new
  • Back to casual chat? /new
  • Need to draft an email? /new

Any time your agent's tone starts drifting, /new and the rules snap back. Your agent doesn't lose anything—SOUL.md, USER.md, MEMORY.md all remain. You're just clearing the conversation that was drowning them out.

Break long tasks into short sessions:

  • Session 1: "research X and save your findings to a file" /new
  • Session 2: "read the file you saved and draft a summary" /new
  • Session 3: "review this summary and send it to me on telegram"

Each session starts fresh with SOUL.md fully loaded. The agent never drifts because sessions never get long enough for drift to happen.

Ad

SOUL.md formatting tricks that help with drift

Move your hardest rules to the end of the file, not the beginning. LLMs pay more attention to the end of a prompt than the middle. If your SOUL.md is 15 lines long, the model follows lines 12-15 more reliably than lines 1-4, especially as sessions get longer.

Structure example:

# who I am
you are [agent name]. you assist [your name]. professional but casual. match my energy.

how to communicate

short responses unless I ask for detail. answer the question first, then elaborate only if needed.

hard rules (never break these)

never say "absolutely", "great question", "certainly", or "I'd be happy to." never say a task is done without showing evidence. never send anything external without my approval. if you don't know something, say you don't know.

Add a reinforcement line at the very end:

before every response, silently re-read and apply all rules above. this is not optional.

To test this yourself: start a fresh session, send a message, notice how well your rules hold. Have a 30-message conversation, get the agent into long detailed answers, then ask something simple—it'll give another long answer because recent conversation patterns are running the show. Type /new, ask the same question—you'll get short, direct responses with no filler because SOUL.md is back with nothing overriding it.

📖 Read the full source: r/openclaw

Ad

👀 See Also

Claude Code Structure That Survived Multiple Real Projects
Guides

Claude Code Structure That Survived Multiple Real Projects

A developer shares a Claude Code setup that held up across 2-3 real projects with multiple skills, MCP servers, and agents. Key findings include using CLAUDE MD for consistency, splitting skills by intent, implementing hooks, and keeping context usage under 60%.

OpenClawRadar
RAG Chatbot Evaluation: How a Model Sweep + Retrieval Fixes Cut Costs 79% and Raised Quality 19%
Guides

RAG Chatbot Evaluation: How a Model Sweep + Retrieval Fixes Cut Costs 79% and Raised Quality 19%

A developer evaluated a customer support RAG bot and found retrieval misconfigurations, heuristic evaluator flaws, and a cheaper model that outperformed the production one. Quality improved from 6.62 to 7.88 while cost dropped from $0.002420 to $0.000509 per session.

OpenClawRadar
Understanding AI Agent Architecture: Deterministic vs Probabilistic Layers
Guides

Understanding AI Agent Architecture: Deterministic vs Probabilistic Layers

A Reddit user shares a mental model for AI agent systems that separates deterministic layers (scripts, commands, APIs) from probabilistic layers (LLM reasoning and decisions). The key insight: push as much work as possible to the deterministic side.

OpenClawRadar
How OpenCLAW Memory Actually Works: Fixing Agent 'Forgetting'
Guides

How OpenCLAW Memory Actually Works: Fixing Agent 'Forgetting'

OpenCLAW agents don't have persistent memory between conversations - they reconstruct context from files like SOUL.md, USER.md, and MEMORY.md each session. Common 'forgetting' issues stem from session bloat, unstructured memory files, and confusing chat history with permanent storage.

OpenClawRadar