github thedotmack/claude-mem v7.3.1
v7.3.1 - Pending Messages Cleanup Fix

latest releases: v9.0.12, v9.0.11, v9.0.10...
one month ago

🐛 Bug Fixes

Pending Messages Cleanup (Issue #353)

Fixed unbounded database growth in the pending_messages table by implementing proper cleanup logic:

  • Content Clearing: markProcessed() now clears tool_input and tool_response when marking messages as processed, preventing duplicate storage of transcript data that's already saved in observations
  • Count-Based Retention: cleanupProcessed() now keeps only the 100 most recent processed messages for UI display, deleting older ones automatically
  • Automatic Cleanup: Cleanup runs automatically after processing messages in SDKAgent.processSDKResponse()

What This Fixes

  • Prevents database from growing unbounded with duplicate transcript content
  • Keeps metadata (tool_name, status, timestamps) for recent messages
  • Maintains UI functionality while optimizing storage

Technical Details

Files Modified:

  • src/services/sqlite/PendingMessageStore.ts - Cleanup logic implementation
  • src/services/worker/SDKAgent.ts - Periodic cleanup calls

Database Behavior:

  • Pending/processing messages: Keep full transcript data (needed for processing)
  • Processed messages: Clear transcript, keep metadata only (observations already saved)
  • Retention: Last 100 processed messages for UI feedback

Related

  • Fixes #353 - Observations not being saved
  • Part of the pending messages persistence feature (from PR #335)

Full Changelog: v7.3.0...v7.3.1

Don't miss a new claude-mem release

NewReleases is sending notifications on new releases.