# Memory Capacity Patterns

## Problem
Memory store has a character limit. When it fills up, new adds fail, and replace/remove operations can get stuck in loops if old_text doesn't match.

## Symptoms
- "Content is required" error on valid add requests (tool misreporting)
- "old_text is required" on valid remove/replace requests
- Success on some adds, then repeated failures with same parameters
- "Replacement would put memory at X/Y chars" — too big

## Fix
1. **Consolidate first** — Merge multiple short entries into fewer, tighter entries before adding new ones
2. **Trim existing entries** — Remove redundant words, abbreviate where unambiguous
3. **Use target=memory for non-user facts** — Only use target=user for user-specific facts; store environment/tech facts in target=memory (separate bucket)
4. **Be selective** — Only save facts that will matter in 7+ days. Don't save every detail from a conversation
5. **Check current usage** — If you get unexpected failures, review what's already saved before trying to add more

## Pattern from Real Session
Session produced 3 successful adds, then hit limit. 4th add failed with confusing errors. Lesson: count your entries and consolidate proactively.