Multi-agent Mac mini setup (Opus coordinator + Sonnet sub-agents via sessions_spawn). Three related questions about context persistence:
-
When auto-compaction fires mid-conversation, the compacted summary loses granular details (specific file paths, exact tool call sequences, partial progress on multi-step tasks). Is there a recommended pattern beyond MEMORY.md for preserving critical in-flight state? Currently I write to working-state.md before major operations, but compaction can still hit between the write and the actual work.
-
Sub-agents spawned via sessions_spawn get a task description but no access to the coordinator's conversation history or memory files unless explicitly told to read them. Is there a way to auto-inject specific files (like a shared context file) into every spawned sub-agent's context without repeating it in every task prompt? Something like agents.defaults.contextFiles or similar?
-
Cron jobs run in isolated sessions with no memory of previous runs. My PostHog analytics cron, for example, can't compare today's numbers to yesterday's because it has no state. The workaround is writing results to a file and having the next run read it, but that's fragile. Is there an intended pattern for cron state persistence, or is the file-based approach the best we have?
Setup: OpenClaw 2026.2.19-2, Mac mini M4, Discord. MEMORY.md ~8KB, memory/ dir with ~40 files across topics/agents/daily.