-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
Bug Description
CLI commands like basic-memory tool --help and basic-memory status hang indefinitely after displaying output, requiring Ctrl+C to exit.
Reproduction Steps
- Run
uvx basic-memory tool --help - Observe: help text displays but process never exits
- Must Ctrl+C to terminate
Also affects:
basic-memory tool write-note --helpbasic-memory tool read-note --helpbasic-memory tool search-notes --helpbasic-memory status
Expected Behavior
Command should exit with code 0 after displaying output.
Root Cause
ensure_initialization() and CLI commands create database connections via asyncio.run() that are never cleaned up. The global database engine holds async connections that prevent the process from exiting.
Environment
- basic-memory version: 0.16.x
- Python: 3.12+
- Platform: macOS/Linux
Metadata
Metadata
Assignees
Labels
No labels