Frozen snapshot pattern for memory injection #718

Closed
opened 2026-10-27 13:37:28 +00:00 by sam · 0 comments
Owner

Implement the frozen snapshot pattern: memory content is read at session start and injected into the system prompt as a snapshot. On write, files are updated immediately but the system prompt is NOT changed mid-session. Only the next session picks up the new snapshot.

Acceptance Criteria

At session start, MEMORY.md and USER.md are read and formatted into a system prompt block
This formatted block becomes part of the session's system prompt (frozen for the session duration)
When a memory write occurs, the files are updated immediately on disk
The in-memory snapshot for the current session is NOT updated
The next session reads the fresh files and creates a new frozen snapshot
Config flag to disable frozen snapshot (always read fresh) for testing


Imported from beads archie-core-1786637494853-193-12981021 · GitHub #214 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08

Implement the frozen snapshot pattern: memory content is read at session start and injected into the system prompt as a snapshot. On write, files are updated immediately but the system prompt is NOT changed mid-session. Only the next session picks up the new snapshot. ### Acceptance Criteria At session start, MEMORY.md and USER.md are read and formatted into a system prompt block This formatted block becomes part of the session's system prompt (frozen for the session duration) When a memory write occurs, the files are updated immediately on disk The in-memory snapshot for the current session is NOT updated The next session reads the fresh files and creates a new frozen snapshot Config flag to disable frozen snapshot (always read fresh) for testing --- _Imported from beads `archie-core-1786637494853-193-12981021` · GitHub #214 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumtask labels 2026-10-27 13:37:28 +00:00
sam self-assigned this 2026-10-27 13:37:28 +00:00
sam closed this issue 2026-10-27 13:37:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#718