> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiroshios.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory Dreaming Sweeps

> Background memory consolidation and long-term context updates.

Hiroshi features an offline memory dreaming routine that runs during idle intervals to consolidate short-term interactive histories into long-term structures.

### 💤 1. The Dreaming Consolidation Loop

During low-activity windows, background worker threads analyze the session's raw SQLite transaction logs:

1. Synthesizes key milestones, learned preferences, and facts.
2. Appends or updates the master long-term memory card at `~/.hiroshi/memory/MEMORY.md`.

### 🧹 2. Log Pruning & Hygiene

Once transactions are consolidated into the long-term card:

* Raw historical message vectors are pruned to compress the local SQLite WAL footprint.
* Baseline context remains dense and relevant, protecting prompt space for future execution turns.
