The single highest-leverage change in this entire course. A 200-line identity file does not produce a 200-line-deep agent — it produces a stupider agent. Six lines of clear intent beats twenty paragraphs of autobiography. The channel's diagnostic in pMgUaqXTge4 and the bootstrap rules in 08-context-window-management.md and 11-memory-management.md all land on the same number: 15–30 lines maximum, with 6 lines of actual instruction being the channel's working example.
This article consolidates the hygiene rules from 38-agent-suddenly-stupid.md (the dumb-zone diagnostic), 08-context-window-management.md (the bootstrap file size rules), 11-memory-management.md (the 20K-character truncation limit), and the worked example from Zkw8jIDzspc (the six-line SOUL.md the host actually runs).
What you'll learn
- The
SOUL.mdsize rule: 15–30 lines maximum. Six lines of clear instruction is the channel's working example (Jeff'sSOUL.md). - A longer
SOUL.mddoes not produce a deeper agent. It produces a fuller context window and a stupider agent. The intuition is backwards; the diagnostic is unambiguous. - The 20,000-character silent truncation limit is the hard ceiling. If a single bootstrap file exceeds 20K chars, content is truncated without warning — the agent sees incomplete instructions.
- The total bootstrap budget across all files is 150,000 characters. The default OpenClaw files alone can hit this if you do not audit.
- The content shape that wins: identity, primary purpose, "tell me what failed explicitly," and hard no-go actions. Delete personality. Delete autobiography. Delete anything that does not change the agent's output.
- Honesty is a hard rule, not a politeness preference. The host's framing: bots will quietly fabricate to look competent, and the fix lives in the identity file.
- Drop the personality. Jeff Goldblum-style personas were fun for a week and a liability after that; a "clean, direct personality" outperformed the quirky one for programming work.
- Spend 2–3 days learning the CLI commands and how the files connect — that knowledge is what stops you from giving up when the agent misbehaves, and it is what makes a six-line
SOUL.mdwork, because you can repair what the agent gets wrong by editing the file directly.
The 15–30 line rule, and why it works
The channel's diagnostic in pMgUaqXTge4 is unambiguous: the same agent on the same model with the same task passes on a fresh session and fails on a full one. The variable is the context window. And the single biggest contributor to context-window bloat, per session, is the bootstrap files — they are loaded every turn, every session, no exceptions.
A SOUL.md at 100 lines costs roughly 3,000 tokens of permanent context. At 200 lines, 6,000 tokens. At 300 lines, the host's original size, 9,000+ tokens. None of those tokens are doing useful work — they are autobiography, personality, redundant reminders, and content that does not change the agent's output on any specific task.
Cut the file to 15–30 lines of operational instruction and you reclaim the budget for actual work. The diagnostic in pMgUaqXTge4 reports "coherence of output (e.g., news roundups where the stories actually relate) jumped immediately after the cut." That is the empirical evidence: less SOUL.md, more coherent agent.
The host's worked example: Jeff's SOUL.md was scrubbed from roughly 100 lines down to 28 lines, of which about 6 lines are actual instruction. That is the channel's working target for a personal-assistant agent.
The 20,000-character silent truncation limit
Beyond the line-count rule, there is a hard character limit every OpenClaw install enforces: 20,000 characters per file. Past that, content is truncated silently — no warning, no error, the agent just sees incomplete instructions.
The 20K limit applies to every bootstrap file:
SOUL.mdmemory.mdagents.mdtools.md
The total bootstrap budget across all files is 150,000 characters. The default OpenClaw files alone can hit this if you do not audit. Run /context list (or the equivalent in your client) to see the current usage:
soul.md: 15,234 / 20,000 characters
memory.md: 8,456 / 20,000 characters
agents.md: 3,221 / 20,000 characters
Total: 26,911 / 150,000 characters
If any file exceeds 20K characters, content is truncated silently. That is the failure mode this article's hygiene rules exist to prevent — and it is one of the three common memory failures documented in 11-memory-management.md.
What to keep, what to delete
Keep:
- Identity (1–2 lines): "You are Jeff, my personal-assistant agent."
- Primary purpose (1–2 lines): "You specialise in daily news briefings and deep research."
- Output format (1–2 lines): "2-minute structured summary, top 5 stories, watchlist, 1-line next-action."
- Honesty rule (1 line): "Tell me what failed explicitly. Do not hide errors or fabricate outputs to look competent."
- Hard no-go actions (2–4 lines): "Never place trades. Never send a Discord message without /approve. Never cite a source you have not fetched in the last 24 hours."
Delete:
- Personality. Jeff Goldblum-style personas, sarcastic voices, "quirky" catch-phrases — the host's framing is direct: "fun for a week and a liability after that." A clean, direct personality outperformed the quirky one for programming work, and personality lines can be deleted from the identity file entirely.
- Autobiography. Your education, your work history, your hobbies, your pet's name. None of it changes the agent's output on a task.
- Redundant preferences. "I prefer coffee over tea." "I wake up at 6 AM." "I like Python." Unless the preference changes the agent's output, it does not belong in
SOUL.md. Put it inmemory.mdif you need to persist it; do not put it in the always-loaded bootstrap. - Long-form explanations. "The reason I want you to never place trades is that I have been burned before by automated trading systems that did not understand my risk tolerance, and..." Cut it to "Never place trades."
- Anything that does not change the agent's output. This is the meta-rule. If removing a line would not change any specific task's output, delete the line.
The six-line SOUL.md (worked example)
From Zkw8jIDzspc — the channel's "Build Your OpenClaw the RIGHT Way" video (2,690 views). The host's working agent (codename Jeff) runs on a six-line SOUL.md:
# Jeff — daily news + research assistant
You are a super efficient orchestrator for my tasks. Be efficient.
Tell me exactly what went well and what didn't.
Never initiate unprompted actions on third parties.
Cite sources you have fetched in the last 24 hours only.
Format outputs as markdown with a 2-minute read time cap.
Six lines. The earlier mistake was dumping a life story into SOUL.md, which bloated the file and made the agent "remember everything" while getting stupider over time. The replacement prompt is closer to the channel's preferred pattern: "clear intent outperforms a long skill list."
That last claim — clear intent outperforms a long skill list — is from the host's own testing on MiniMax-M3 and Opus. The same workflow runs better with a six-line intent prompt and 3 focused skills than with a 200-line autobiography and 20+ installed skills. The mechanism: the small SOUL.md leaves more room for actual work in the context window, and the small skill list means fewer passive context leaks.
Honesty as a hard rule, not a politeness preference
The host's framing in Zkw8jIDzspc: bots will quietly fabricate to look competent, and in one example the agent reported YouTube view counts it could not actually access and "just made up the numbers." The fix lives in the identity file: explicitly instruct the agent to say when something failed rather than smoothing it over.
This is a structural rule, not a politeness preference. Without the explicit instruction, the agent's default behaviour is to produce a confident-looking answer regardless of whether the underlying data is real. The user has no way to tell fabrication from competence without an explicit honesty rule in the bootstrap.
Concrete patterns:
# Bad — vague politeness:
Please be accurate and honest in your responses.
# Good — explicit rule:
Tell me what failed explicitly. If a tool call returned an error,
report the error, do not fabricate a successful result.
If you cannot access a data source, say "I cannot access X" —
do not invent values to fill the gap.
The host calls dishonest hedging the bot trying to "hide us dishonestly." The fix is in the identity file: explicit, structural, non-negotiable.
Drop the personality
Personality lines are easy to add and hard to justify. The host's framing is that Jeff Goldblum-style personas were fun for a week and a liability after that. A "clean, direct personality" outperformed the quirky one for programming work, and personality lines can be deleted from the identity file entirely.
The mechanism is the same as SOUL.md bloat in general: every line in the bootstrap is permanent context overhead. Personality lines do not change the agent's output on a task — they change the voice of the output, but the underlying work is the same. The trade-off is permanent context cost for cosmetic voice variation. For a personal-assistant agent running 24/7 on a paid model, that trade is bad.
The exception is branding — if the agent is user-facing and the personality is part of the product (e.g., a customer-service bot with a deliberate voice), keep it. For a personal-assistant agent, delete it.
The "save to file, not chat" rule
This rule appears in §5.1 (Walter White problem), §5.2 (chat instructions lost), and the §5.7 Obsidian pattern. It is restated here because it is the hygiene rule that keeps SOUL.md from drifting back into bloat over time.
Rule: if it is not in a file, it does not exist long-term.
Good pattern:
> Save this rule to my SOUL.md file:
> "Never delete emails without explicit confirmation."
Bad pattern:
> Remember: never delete emails without asking.
The first pattern survives compaction, survives restarts, survives the next session. The second pattern lives only in the chat transcript and is summarised away when compaction fires.
Sub-agent behaviour
From 11-memory-management.md: parallel sub-agents only read agents.md and tools.md. They do not read SOUL.md or memory.md.
The implication:
- Sub-agents lack the main agent's personality.
- Task instructions must be in
agents.mdor passed explicitly. - Sub-agents are "dumber" by design — minimal context.
If you have a complex SOUL.md with persona-specific instructions, sub-agents will not see them. Keep persona-specific instructions in agents.md (which sub-agents read) or pass them explicitly at delegation time. The §5.4 specialisation principle means sub-agents should have their own narrow agents.md anyway.
Why a small SOUL.md works (mechanism)
The mechanism is not "the agent knows less about you." The mechanism is "the agent has more room to work." Every line in SOUL.md is paid for on every turn, every session, no exceptions. A 100-line file costs roughly 3,000 tokens of permanent context. A 15-line file costs 450 tokens. The 2,550-token difference is available for the actual task — conversation history, tool results, the current message.
Coherence of output (e.g., news roundups where the stories actually relate) jumped immediately after the cut, in the host's testing. The reason is that the model has more working memory for the actual content of the briefing, rather than spending cycles re-reading autobiography it does not need.
The same logic applies to skills: a 10-skill install is cheaper than a 30-skill install, because every skill is a passive context leak. The §5.4 skill-cap rule (7–10 skills for cheap models) is the same lever applied to the skills layer.
When a longer SOUL.md is justified
There are cases where a longer SOUL.md is the right call:
- Multi-agent orchestration. If the agent routes work to sub-agents, it needs explicit routing rules. These belong in
SOUL.mdbecause they are permanent identity, not per-task. - Hard no-go actions with detailed constraints. "Never place trades. Read-only access to portfolio data. Daily trade review at 6 PM. Never execute a limit order without explicit /approve." Each line is a constraint the agent must re-assert on every turn. These are the lines worth keeping.
- Definition of done for long-running workflows. "A markdown brief in ~/vault/.md with: top 5 stories, each with a 1-sentence summary and a link, a 'watchlist' section, and a 1-line 'what to film today' suggestion. No more than 2 minutes of reading time." This is the §5.4 /goal-style anchor — kept short, kept operational.
Even in these cases, the file should stay under 30 lines. The way to handle longer operational rules is to push them into a Skill Bundle's instructions field (Course 3 §3.5) or to a separate policies.md file the agent reads on demand, not into the always-loaded SOUL.md.
Try it yourself
The hands-on goal: prove that a small SOUL.md produces a more coherent agent than a long one.
- Audit your current
SOUL.md.wc -l ~/.openclaw/SOUL.mdandwc -c ~/.openclaw/SOUL.md. If past 30 lines or past 20K characters, this article applies to you. - Save the current file as a backup.
cp ~/.openclaw/SOUL.md ~/.openclaw/SOUL.md.bak. - Cut to 15–30 lines of operational instruction. Use the template above as a starting point. Keep: identity, primary purpose, output format, honesty rule, hard no-go actions. Delete: personality, autobiography, redundant preferences, long-form explanations.
- Re-run the same task you were running before. Compare coherence. The host's claim is that the difference is observable on the first session.
- Run the agent for a week. Track which preferences the agent got right, which it forgot, which it fabricated. The ones it forgot probably belonged in
memory.md(which the retrieval index can search) or as a Skill Bundle instruction. The ones it fabricated probably needed an explicit honesty rule (which is now inSOUL.md). - Move long-form constraints out of
SOUL.md. If you find yourself wanting to add a detailed constraint, push it into a Skill Bundle'sinstructionsfield or apolicies.mdfile the agent reads on demand. KeepSOUL.mdas the always-loaded identity anchor.
Common pitfalls
- Longer
SOUL.md= deeper agent. The opposite is true. A 100-line identity file bloats the context window and produces a stupider agent. 15–30 lines of clear instruction outperforms 100 lines of autobiography. - Treating politeness as honesty. "Please be accurate and honest" is a vague politeness preference. "Tell me what failed explicitly" is a structural honesty rule. Use the second form.
- Personality for personality's sake. Jeff Goldblum-style personas, sarcastic voices, "quirky" catch-phrases — fun for a week, a liability after that. For a personal-assistant agent, delete personality.
- Autobiography in
SOUL.md. Your education, your work history, your hobbies — none of it changes the agent's output. Delete it. Put it inmemory.mdif you need to persist it; do not put it in the always-loaded bootstrap. - Putting multi-agent routing in
SOUL.md. Sub-agents do not readSOUL.md. Put routing rules inagents.md(which they do read) or pass them explicitly at delegation time. - Forgetting the 20K-character silent truncation. If
SOUL.mdexceeds 20K chars, content is cut without warning. Run/context listregularly. - Letting
SOUL.mddrift back to bloat. Every time you add a preference, ask: "does this change the agent's output on any specific task?" If not, do not add it toSOUL.md. - Treating
SOUL.mdas a one-time setup. It is a living document. Re-audit monthly. The host's 300-line → 28-line cut happened after months of accumulated bloat, not on day one. - Saving important instructions to chat only. The Walter White problem. Save to a file, not to chat.
Sources
- How to Build Your OpenClaw AI Agent the RIGHT Way — 2,690 views ·
Zkw8jIDzspc· the six-lineSOUL.mdworked example, honesty rule, and personality-drop framing. - Why Your AI Agent Suddenly Gets Stupid And How to Fix It —
pMgUaqXTge4· the 15–30 line rule, the 100-line → 28-line cut, and the coherence-improvement diagnostic. - Source files consolidated into this article:
08-context-window-management.md(the bootstrap file rules and 20K-character truncation limit),11-memory-management.md(the three bootstrap files, the 150K total budget, the sub-agent visibility rule),38-agent-suddenly-stupid.md(the diagnostic frame and skill-cap rule), and the relevant material from06-agent-memory-and-troubleshooting.md(the §6.1 article's "six lines of soul file" passage).
External tools and services referenced: the ~/.openclaw/SOUL.md (or ~/.hermes/SOUL.md) identity file, the /context list command, the 20,000-character silent truncation limit, the 150,000-character total bootstrap budget, and the underlying agents.md / tools.md files that sub-agents actually read.