Memory
aide manages memory at two layers: per-agent session memory (Claude Code native) and centralized HQ memory (aide's SSOT).
Two layers
| Layer | Location | Who manages | Persistent? |
|---|---|---|---|
| Session memory | Claude Code ~/.claude/projects/*/memory/ | Claude Code (native) | Per-session, native compact |
| HQ memory (SSOT) | <team>-hq/memory/<agent>/ | aide (commander) | Git-tracked, versioned |
Session memory
Claude Code's built-in memory. Each agent session has its own working memory that persists across compactions within that session. aide adds auto-compaction:
[memory]
compact_after = "200k"
When estimated tokens in memory/ exceed the threshold, aide triggers a compaction pass.
HQ memory (centralized SSOT)
After each aide dispatch completes, the agent's output is automatically distilled into HQ memory:
<team>-hq/
├── memory/
│ ├── _shared/ # team-level context (arch decisions, conventions)
│ ├── crossmem-rs/
│ │ └── context.md # auto-distilled from dispatch outputs
│ └── crossmem-web/
│ └── context.md
The distillation process:
- Read existing
memory/<agent>/context.md(old memory) - Read
memory/_shared/(team context, read-only) - LLM merges old + new summary — not append, but intelligent merge with dedup
- Write updated
context.md - Git commit:
memory: sync <agent> @ <timestamp>
This means:
- One source of truth — no conflicting memories across agents
- Git-tracked — full version history,
git log memory/<agent>/shows evolution - Rollback —
git revertif a distillation goes wrong - Multi-machine sync — push/pull the HQ repo
Configuration
Set the HQ directory in ~/.aide/config.toml:
hq = "/path/to/team-hq"
aide init sets this automatically when creating an HQ.
Manual sync
Backfill or manually trigger memory distillation:
# From a summary string
aide memory-sync crossmem-rs --summary "STATUS: success ..."
# From stdin (pipe from a file, etc.)
cat output.txt | aide memory-sync crossmem-rs
Tips
- Set
compact_afterslightly below your typical task budget to avoid compaction eating into task tokens - Use the
commit-memoryhook to track per-agent memory in git - HQ memory is injected into future dispatches automatically — keep it concise
_shared/is for team-level context (architecture, conventions) that all agents should know