Problem
Each LocalConversation gets its own InMemoryFileStore with an LRU cache. The cache has no configured maximum size. With N conversations on a server, each accumulating event data, the total memory from file store caches grows without bound.
Location: io/memory.py
Evidence
Code review. Each event is stored as a JSON string in the file store. A conversation with 2000 events at ~500 bytes each = ~1 MB per conversation in the cache alone. With 500 conversations: ~500 MB just in caches.
Severity: High
Impact of fix
Bounded memory per conversation, predictable server memory usage.
Suggested fixes
- Configure a max cache size per store
- Or use a shared LRU across conversations with a global memory budget
Related issues and PRs
Discovered during profiling investigation (code review), May 2026. openhands-sdk v1.19.1.
Problem
Each
LocalConversationgets its ownInMemoryFileStorewith an LRU cache. The cache has no configured maximum size. With N conversations on a server, each accumulating event data, the total memory from file store caches grows without bound.Location:
io/memory.pyEvidence
Code review. Each event is stored as a JSON string in the file store. A conversation with 2000 events at ~500 bytes each = ~1 MB per conversation in the cache alone. With 500 conversations: ~500 MB just in caches.
Severity: High
Impact of fix
Bounded memory per conversation, predictable server memory usage.
Suggested fixes
Related issues and PRs
Discovered during profiling investigation (code review), May 2026. openhands-sdk v1.19.1.