Skip to content

[feature]: Memory files grow unbounded on disk #9

Description

@faisalishfaq2005

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

  • I've checked this isn't already on the roadmap in the README.
  • This can't reasonably be expressed as a loop instead of engine code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions