Repository navigation
Conversation
The MCP server event loop was blocked during workflow execution because sequant_run used spawnSync. This made sequant_status and sequant_logs unreachable while a run was in progress. - Replace spawnSync with async spawn wrapped in Promise (spawnAsync) - Buffer stdout/stderr via stream handlers, preserve truncation limits - Add timeout handling with process group kill (detached + negative PID) - Handle ENOENT and other spawn errors with descriptive messages - Update all tests to mock async spawn with EventEmitter-based pattern - Add integration tests verifying concurrent tool call responsiveness Closes #388 Entire-Checkpoint: 0e5ec6e75627
6 tasks
The MCP SDK passes AbortSignal via the extra parameter on tool callbacks, but registerTool's TypeScript inference defaults InputArgs to undefined, collapsing the callback to single-arg. Work around this with a type assertion to accept the two-arg callback (args, extra). spawnAsync now accepts an optional signal and kills the process group when aborted. Also clarifies the empty catch block in killProcessGroup. Entire-Checkpoint: f4f792a7219d
Entire-Checkpoint: 7e03f7554712
admarble
deleted the
feature/388-mcp-server-replace-spawnsync-with-async-spawn-for-
branch
March 23, 2026 22:05
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spawnSyncwith asyncspawninsequant_runMCP tool so the server event loop remains responsive during workflow executiondetached: true+ negative PID kill) to prevent orphan processesPre-PR AC Verification
spawninstead ofspawnSyncsrc/mcp/tools/run.ts:144registerToolcallback type inference prevents accessingextra.signal. Timeout-based cleanup works.run.ts:84—stdout.slice(-2000),stderr.slice(-1000)run.ts:68— 1800000ms timeout with SIGTERMrun.ts:166-171— descriptive error messagerun.ts:184-195— process group kill via-pidTest plan
npm run buildpassesnpm run lintpassesnpm test— 1788/1788 tests pass (77 files)Closes #388