memory
NAME
memory — memory and persistence in SLICC
DESCRIPTION
SLICC uses a virtual filesystem (VFS) backed by IndexedDB for persistent storage. VFS content survives tab closes, page refreshes, and browser restarts. Conversations are also persisted in IndexedDB via SessionStore, so sessions can be restored after reopening the browser.
WHAT PERSISTS
- VFS content — all files written to the virtual filesystem
- IndexedDB data — internal state and session metadata
- Conversations — chat history stored via SessionStore in IndexedDB
WHAT DOES NOT PERSIST
- Shell environment variables — reset on every new session
- Running processes — WASM shell processes do not survive page reloads
- Open browser tabs — CDP-managed tabs are not restored
MEMORY FILES
/shared/CLAUDE.md — Global Memory
The global agent system prompt file. It is loaded into the system prompt for the cone and all scoops. Use it to store learned user preferences, project conventions, and information that all agents should know.
The cone should update this file using the update_global_memory tool rather than writing to it directly. This is a cone-only tool — scoops cannot call it.
/scoops/{name}/CLAUDE.md — Scoop Memory
Each scoop can have its own CLAUDE.md file at /scoops/{name}/CLAUDE.md. This file is loaded into that scoop's system prompt and provides scoop-specific context. Use it to give a scoop persistent instructions or preferences that survive across multiple feed_scoop calls.
File-Based Structured Data
For structured information beyond what fits in CLAUDE.md, create dedicated files on the VFS. For example:
- User preference files (e.g.,
/shared/preferences.json) - Project notes (e.g.,
/shared/project-notes.md) - Task lists, logs, or any structured data the agent needs to reference later
Files on the VFS are persistent and can be read by any agent with access to the path.
CONTEXT COMPACTION
Long conversations are automatically compacted when they approach ~183K tokens. The compaction process uses an LLM to summarize earlier parts of the conversation, preserving key context while freeing token space. Oversized messages (over 40K characters) are replaced with placeholders during overflow recovery. Images are auto-resized before being sent to the LLM (5MB base64 limit).
Because compaction is lossy, important information should be stored in files rather than relying on it remaining in conversation history. Write critical facts to CLAUDE.md or dedicated files early in the conversation.
MOUNT COMMAND
The mount command bridges a local directory on the host filesystem into the VFS, providing persistent on-disk storage. Mounted directories sync between the real filesystem and the virtual one, so changes persist outside of IndexedDB.
mount /local/path /vfs/mount/point
This is useful for working with real project files, accessing repositories, or persisting data beyond the browser's IndexedDB storage.
SESSION RESTORATION
Conversations are stored in IndexedDB via SessionStore. When the agent is reopened after a tab close or page refresh, previous sessions can be restored. The VFS state is also preserved, so files written in earlier sessions remain available.
BEST PRACTICES
- Store important info early. Don't wait until the end of a conversation to save critical information. Write it to a file as soon as you learn it — context compaction may summarize it away.
- Use files for structured data. CLAUDE.md is best for preferences and brief notes. For larger or structured data, create dedicated files.
- Update CLAUDE.md for preferences. When the user expresses a preference or convention (coding style, naming patterns, workflow preferences), persist it in
/shared/CLAUDE.mdusingupdate_global_memoryso all agents learn it. - Don't rely on conversation memory for facts. Long conversations get compacted. If you need to remember something across many turns, write it to a file.
- Use scoop CLAUDE.md for scoop-specific context. If a scoop needs persistent instructions across multiple tasks, write them to its CLAUDE.md file.
- Environment variables don't persist. If a workflow depends on env vars, document the required values in a file so they can be re-set in future sessions.
SEE ALSO
cone, scoops, tools, commands