Files
paseo/packages
Mohamed Boudra 6b9fbb83c0 Fix MCP request hangs caused by agent interruption
This fixes two root causes of MCP tool calls hanging indefinitely:

1. Transform ensureValidJson from validator to transformer
   - Previously threw errors on undefined values, causing handlers to crash
   - Now converts undefined→null, Date→ISO string, bigint→string, etc.
   - Ensures all MCP handlers always return valid JSON responses

2. Cancel waitTracker when interrupting agents
   - Added waitTracker.cancel() in cancel_agent handler
   - Added waitTracker.cancel() in kill_agent handler
   - Resolves waiting wait_for_agent promises when agents are interrupted
   - Prevents indefinite hangs requiring server restart

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 11:41:11 +00:00
..