strix
strix copied to clipboard
fix: resolve tool server disconnection on Windows 11
Description
Fixes tool server disconnection issue on Windows 11 caused by multiprocessing spawn behavior.
Problem
On Windows, multiprocessing uses 'spawn' method which re-imports modules in worker processes. This triggered:
- Argument parsing () at import time → crash
- RuntimeError check at import time → crash
- Signal handlers setup at import time → issues
Solution
- Moved argument parsing to block
- Created function for initialization
- now set at startup, not import time
- Workers can safely import the module without side effects
Testing
✅ Multiprocessing with spawn method (Windows behavior)
✅ Server startup with CLI arguments
✅ Health endpoint responding correctly
✅ Graceful rejection without sandbox mode
Changes
strix/runtime/tool_server.py- main fix for multiprocessingstrix/runtime/docker_runtime.py- command formatting cleanup.env.example- configuration reference for users
Tested on Linux with spawn context simulation (Windows behavior).
Closes #[issue-number if exists]