Skip to content

Conversation

@zenyr
Copy link
Contributor

@zenyr zenyr commented Nov 2, 2025

Summary

Improve storage system reliability with better error handling and lock cleanup.

Changes

JSON Error Handling

  • Corrupted JSON files in migration are now skipped with warnings instead of failing
  • Prevents migration from crashing on individual corrupted files

Lock Cleanup

  • Automatic cleanup for unused locks after 10 seconds of inactivity
  • Prevents memory leaks in long-running processes
  • Periodic cleanup every 5 seconds

Global Lock Maintained

  • Storage operations require global synchronization due to interdependencies
  • Ensures data consistency across session/message/part files

Notes

During testing, concurrent session creation showed JSON parsing errors in session.prompt that may indicate issues with repeated session reads during doom loop detection. Further investigation recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant