Summary
When DAB is running in --mcp-stdio mode and stdin is closed (EOF), DAB exits with code 4294967295 (0xFFFFFFFF / -1) instead of shutting down gracefully. This causes MCP health checks to always report the server as disconnected, because health-check tools (e.g. claude mcp list) intentionally close stdin after the initialize handshake.
Environment
- DAB version: 1.7.92
- OS: Windows 11 Enterprise
- Transport:
--mcp-stdio
- MCP client: Claude Code 2.1.98
Steps to Reproduce
# Send initialize, then immediately close stdin
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1"}},"id":1}' \
| dab start --config dab-config.json --mcp-stdio
echo "Exit code: $?"
After DAB finishes startup and sends the initialize response, stdin reaches EOF (because echo exits). DAB exits with code 4294967295 instead of 0.
Expected Behavior
DAB should handle stdin EOF gracefully:
- Stop accepting new requests.
- Finish any in-progress requests.
- Exit with code 0.
Actual Behavior
DAB exits with code 4294967295 (unhandled exception / abnormal termination) when stdin closes.
Impact
MCP health-check tools close stdin after receiving the initialize response (standard probe behavior). DAB's crash on EOF causes every health check to report ✗ Failed to connect, even when the server is fully functional and responds correctly to the initialize request.
In a real session (where stdin stays open), this crash does not occur — but it breaks all automated connectivity checks and monitoring.
Suggested Fix
In --mcp-stdio mode, add a graceful stdin-EOF handler: catch the ObjectDisposedException / IOException on the stdin read loop and exit cleanly with code 0 rather than propagating an unhandled exception.
Summary
When DAB is running in
--mcp-stdiomode and stdin is closed (EOF), DAB exits with code 4294967295 (0xFFFFFFFF / -1) instead of shutting down gracefully. This causes MCP health checks to always report the server as disconnected, because health-check tools (e.g.claude mcp list) intentionally close stdin after theinitializehandshake.Environment
--mcp-stdioSteps to Reproduce
After DAB finishes startup and sends the
initializeresponse, stdin reaches EOF (becauseechoexits). DAB exits with code 4294967295 instead of 0.Expected Behavior
DAB should handle stdin EOF gracefully:
Actual Behavior
DAB exits with code 4294967295 (unhandled exception / abnormal termination) when stdin closes.
Impact
MCP health-check tools close stdin after receiving the
initializeresponse (standard probe behavior). DAB's crash on EOF causes every health check to report✗ Failed to connect, even when the server is fully functional and responds correctly to theinitializerequest.In a real session (where stdin stays open), this crash does not occur — but it breaks all automated connectivity checks and monitoring.
Suggested Fix
In
--mcp-stdiomode, add a graceful stdin-EOF handler: catch theObjectDisposedException/IOExceptionon the stdin read loop and exit cleanly with code 0 rather than propagating an unhandled exception.