strix icon indicating copy to clipboard operation
strix copied to clipboard

fix: resolve tool server disconnection on Windows 11

Open Redrock453 opened this issue 1 month ago • 0 comments

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 multiprocessing
  • strix/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]

Redrock453 avatar Nov 11 '25 23:11 Redrock453