What problem would this solve?
src/core/memory.ts only reads the last MAX_MEMORY_CHARS (12k) of a memory file into prompts, but appendRunRecord appends forever, so the file grows without bound on disk even though only the tail is ever used.
Proposed solution
Add a way to trim old run records while keeping the file human-readable and diffable , either a loopflow memory --prune command or automatic rotation that keeps the N most recent records. Pure-function trimming logic should stay testable.
Alternatives considered
No response
Scope
What problem would this solve?
src/core/memory.ts only reads the last MAX_MEMORY_CHARS (12k) of a memory file into prompts, but appendRunRecord appends forever, so the file grows without bound on disk even though only the tail is ever used.
Proposed solution
Add a way to trim old run records while keeping the file human-readable and diffable , either a loopflow memory --prune command or automatic rotation that keeps the N most recent records. Pure-function trimming logic should stay testable.
Alternatives considered
No response
Scope