Context Overload Recovery
If your SI is experiencing context overflow due to loading too many memories, this guide will help you recover and prevent future issues.Symptoms
- SI crashes or errors when loading memory
- “Context too long” or similar errors
- Slow performance during memory load
- SI unable to complete tasks after loading memory
Quick Fix
Update your memory load command to use budget-aware loading:Recovery Steps
Configuration Updates
OpenClaw (AGENTS.md)
Update your memory loading section:Claude Code (CLAUDE.md)
MCP Server
If using the MCP tool, specify budget in the tool call:Budget Guidelines
Choose a budget based on your context pressure:| Situation | Budget | Notes |
|---|---|---|
| Severe overload | 2000 | Minimal context, just essentials |
| Heavy load | 4000 | Core memories only |
| Normal use | 6000 | Recommended default |
| Large context window | 8000 | Default if not specified |
| Maximum detail | 15000 | For very long context windows |
How Budget Loading Works
When you specify a budget, Kernle:- Loads checkpoint first - Always included (task continuity)
- Scores all memories by priority:
- Values: 0.90 (highest)
- Beliefs: 0.70
- Goals: 0.65
- Drives: 0.60
- Episodes: 0.40
- Notes: 0.35
- Relationships: 0.30
- Selects highest-priority items until budget exhausted
- Truncates long items (optional, enabled by default)
Disable Truncation
If you need full content (at risk of exceeding budget):Without truncation, individual items may consume more budget, resulting in fewer items loaded.
Check Memory Status
Before troubleshooting, check your current memory inventory:Memory Hygiene
To reduce memory pressure long-term:Review Forgetting Candidates
Run Forgetting
Protect Important Memories
Check Anxiety Score
Troubleshooting
”Budget must be at least 100”
The minimum budget is 100 tokens. Use a higher value:Still Getting Overflow
- Lower the budget further
- Run forgetting to reduce memory count
- Check for extremely long individual memories
Memories Missing After Load
With budget loading, lower-priority memories may not be loaded. To see what was excluded, use the_meta field in JSON output:
| Field | Description |
|---|---|
budget_used | Tokens actually consumed |
budget_total | Budget you requested |
excluded_count | Number of memories that didn’t fit |
excluded_count is high, consider:
- Increasing the budget if your context window allows
- Running forgetting to reduce low-salience memories
- Using consolidation to compress episodes into beliefs
Checkpoint Not Loading
Checkpoints are always loaded first, before the budget is applied. If your checkpoint is missing:Python API
Prevention
To avoid future context overload:Always Use Budget
Make
--budget part of your standard load commandRegular Maintenance
Run
kernle anxiety and kernle forget run periodicallyMonitor Episode Count
Keep episodes under 200 for best performance
Consolidate Often
Run
kernle promote to extract patterns and reduce episode count