mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
e5a1f7e683
When the MCP server runs over stdio transport, stdin/stdout are closed before the call_on_close promo callback fires. sys.stdin.isatty() then raises ValueError: I/O operation on closed file. Wrap the isatty() calls in a try/except ValueError in _is_interactive_session() so the promo is silently skipped rather than crashing the shutdown path. Fixes #607 Co-authored-by: bm-clawd <bm-clawd@users.noreply.github.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>