Problem
Every session starts cold. The agent can't remember project conventions, previously discovered patterns, or facts worth preserving across independent sessions. TodoWrite tracks task state within a session but nothing survives session boundaries.
Proposed approach
- A
MemoryTable in the database (project-scoped key-value facts)
- A memory tool (read/write/list) the agent can call explicitly
- Memory injection in
SystemPrompt — load relevant entries and append them to the prompt at session start
Follows the same injection pattern as SystemPrompt.skills() and SystemPrompt.environment().
Why it belongs here
Reduces redundant re-exploration across sessions on the same project. Complements compaction (which manages context within a session) by bridging sessions.
Problem
Every session starts cold. The agent can't remember project conventions, previously discovered patterns, or facts worth preserving across independent sessions. TodoWrite tracks task state within a session but nothing survives session boundaries.
Proposed approach
MemoryTablein the database (project-scoped key-value facts)SystemPrompt— load relevant entries and append them to the prompt at session startFollows the same injection pattern as
SystemPrompt.skills()andSystemPrompt.environment().Why it belongs here
Reduces redundant re-exploration across sessions on the same project. Complements compaction (which manages context within a session) by bridging sessions.