You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI tool commands hang after displaying output #461
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 --help
basic-memory tool read-note --help
basic-memory tool search-notes --help
basic-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.
this one might be a bit of a blocker for some as even basic-memory project add... hangs. i noticed there were some ci failures on my pull request but they seem to be unrelated to the changes:
$ uvx basic-memory@latest project add taskmaster-merge ./context/memory
Installed 105 packages in 407ms
2025-12-20 15:18:39.836 | DEBUG | basic_memory.api.template_loader:__init__:235 - Initialized template loader with directory: /Users/myuser/.cache/uv/archive-v0/q0WNp3Nb94j1OvizJA01-/lib/python3.12/site-packages/basic_memory/templates
Project 'taskmaster-merge' added successfully
# After manually hitting Ctrl+C
^CException ignored in: <module 'threading' from '/Users/myuser/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/threading.py'>
Traceback (most recent call last):
File "/Users/myuser/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/threading.py", line 1624, in _shutdown
lock.acquire()
KeyboardInterrupt:
Activity
divideby0 commentedon Dec 20, 2025
this one might be a bit of a blocker for some as even
basic-memory project add...hangs. i noticed there were some ci failures on my pull request but they seem to be unrelated to the changes:phernandez commentedon Dec 24, 2025
fixed with #471