Kaji for macOS is being built in public →
0.2.1May 30, 2026
Agent run persistence overhaul

Chunked agent run persistence prevents bloat

The old single-file agent-runs.json approach could balloon into massive save payloads as changed-file lists grew. The persistence layer was rebuilt with a structured directory layout, chunked file storage, and a debounced actor-based writer. Legacy files are automatically migrated and backed up.

  • Replaced monolithic agent-runs.json with structured AgentRuns/ directory layout
  • Added index.json holding run metadata with compact changed-file previews (first 20)
  • Changed files stored in 200-file chunks under ChangedFiles/<run-id>/
  • Legacy agent-runs.json files are automatically migrated and timestamp-backupd
  • Added AgentRunPersistenceWriter actor with 450ms debounced writes

Changed file snapshot policy filters noise

A new filter caps stored changed files at 500 and excludes paths matching known generated or dependency directories (.git, .build, .next, .swiftpm, DerivedData, build, dist, node_modules), preventing agent run data from being overwhelmed by build artifacts.

  • Added AgentChangedFilesSnapshotPolicy with configurable ignored path components and max count
  • Filters out .git, .build, .next, .swiftpm, DerivedData, build, dist, node_modules paths
  • Caps stored changed files at 500 per run
  • App lifecycle flush ensures no data loss via AgentRunStore.flushPersistence() on terminate
  • Bumped Kaji to 0.2.1