fix(mcp): Graceful fallback on Windows for daemon mode (GH#387)
- Skip daemon mode on Windows (sys.platform == win32) - Falls back to CLI mode which works on all platforms - Avoids asyncio.open_unix_connection which does not exist on Windows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Moved write stream creation after redirect handling to avoid orphan streams
|
- Moved write stream creation after redirect handling to avoid orphan streams
|
||||||
- Added delay after file close to ensure Windows releases file handle
|
- Added delay after file close to ensure Windows releases file handle
|
||||||
|
|
||||||
|
- **Windows MCP daemon mode crash** (GH#387) - Windows compatibility
|
||||||
|
- beads-mcp now gracefully falls back to CLI mode on Windows
|
||||||
|
- Avoids `asyncio.open_unix_connection` which doesn't exist on Windows
|
||||||
|
- Daemon mode still works on Unix/macOS
|
||||||
|
|
||||||
- **FatalErrorRespectJSON** (bd-28sq) - Consistent error output
|
- **FatalErrorRespectJSON** (bd-28sq) - Consistent error output
|
||||||
- All commands respect `--json` flag for error output
|
- All commands respect `--json` flag for error output
|
||||||
- Errors return proper JSON structure when flag is set
|
- Errors return proper JSON structure when flag is set
|
||||||
|
|||||||
@@ -831,6 +831,11 @@ def create_bd_client(
|
|||||||
If prefer_daemon is True and daemon is not running, falls back to CLI client.
|
If prefer_daemon is True and daemon is not running, falls back to CLI client.
|
||||||
To check if daemon is running without falling back, use BdDaemonClient directly.
|
To check if daemon is running without falling back, use BdDaemonClient directly.
|
||||||
"""
|
"""
|
||||||
|
# Windows doesn't support Unix domain sockets (GH#387)
|
||||||
|
# Skip daemon mode entirely on Windows
|
||||||
|
if prefer_daemon and sys.platform == 'win32':
|
||||||
|
prefer_daemon = False
|
||||||
|
|
||||||
if prefer_daemon:
|
if prefer_daemon:
|
||||||
try:
|
try:
|
||||||
from .bd_daemon_client import BdDaemonClient
|
from .bd_daemon_client import BdDaemonClient
|
||||||
|
|||||||
Reference in New Issue
Block a user