personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix Callosum startup race condition causing dropped messages

Pre-delete stale socket in start_callosum_in_process() before spawning
the server thread. This prevents the ready check from passing due to an
old socket file that the server thread then deletes, causing connection
failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+7 -1
+7 -1
think/supervisor.py
··· 776 776 server = CallosumServer() 777 777 _callosum_server = server 778 778 779 + # Pre-delete stale socket to avoid race condition where the ready check 780 + # passes due to an old socket file before the server thread deletes it 781 + socket_path = server.socket_path 782 + socket_path.parent.mkdir(parents=True, exist_ok=True) 783 + if socket_path.exists(): 784 + socket_path.unlink() 785 + 779 786 # Start server in background thread (server.start() is blocking) 780 787 thread = threading.Thread(target=server.start, daemon=False, name="callosum-server") 781 788 thread.start() 782 789 _callosum_thread = thread 783 790 784 791 # Wait for socket to be ready (with timeout) 785 - socket_path = server.socket_path 786 792 for _ in range(50): # Wait up to 500ms 787 793 if socket_path.exists(): 788 794 logging.info(f"Callosum server started on {socket_path}")