Repository navigation
fix(agent-plugin): restore the non-Windows branch of the .mcp.json MCP launcher - #167
Merged
adityankale190895 merged 2 commits intoNov 18, 2026
Merged
Conversation
…P launcher
The 0.3.11 version bump dropped ": spawn('npx', ...)" from the node -e
script, leaving a ternary with no else branch, so the Codex and Claude
Code launcher was a SyntaxError on every platform.
Fixes DiffCI#166
Signed-off-by: FredApps <[email protected]>
FredApps
commented
Nov 17, 2026
FredApps
left a comment
Contributor
Author
There was a problem hiding this comment.
Cross-review at 0eba80f.
Checked:
- The restored
: spawn('npx', npxArgs, { stdio: 'inherit' })branch makes.mcp.jsonthe same script asmcp.jsonagain. tests/agent-plugin-launchers.test.tsfails without the fix (the.mcp.jsoncompile test and the same-script test) and passes with it.- The branch is up to date with main, and CI is green.
Fixed: nothing needed.
Open: the Windows cmd.exe branch still isn't exercised, as the PR says.
mcpServerEntry builds the launcher init writes into the agents' MCP configuration, and it had the same broken ternary as the plugin's .mcp.json. With only the plugin fixed, cli-agent.test.ts ('init must launch MCP exactly like the portable plugin') fails; CI does not run the CLI test suite, so it did not show. A root test now checks that init's launcher compiles and matches the plugin's; it fails without this change.
Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 01:14
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.
Fixes #166
What changed
integrations/agent-plugin/.mcp.jsonlaunches the DiffCI MCP server withnode -e "<script>". Since the 0.3.11 version bump (1bb4bb7) its script has been a ternary with no:branch, so Node rejects it withSyntaxError: Unexpected token ';'and the server never starts for the Codex plugin (.codex-plugin/plugin.json→./.mcp.json) or Claude Code. This PR puts back: spawn('npx', npxArgs, { stdio: 'inherit' }), so the script is again identical to the one inmcp.json.Regression test
tests/agent-plugin-launchers.test.ts(added torelease-files.json):node -escript from bothmcp.jsonand.mcp.jsonwithvm.Script;Before the fix, the
.mcp.jsoncompile test and the "same script" test fail. After it, all four pass.Validation
npx tsx --test tests/agent-plugin-launchers.test.ts: 4/4 pass (2 failed before the fix).npm run agent:checkandnpm run audit:boundarypass.initializerequest on stdin. It answered{"serverInfo":{"name":"diffci-mcp","version":"0.3.54"}}.Not covered
The Windows
cmd.exebranch is unchanged and not exercised here.Follow-up (also fixed here):
diffci initwrites the same launcher (mcpServerEntryinpackages/diffci-cli/src/client/agent-setup.ts), with the same missing non-Windows branch. With only the plugin files fixed, the CLI testinit must launch MCP exactly like the portable pluginfails; CI runs only typecheck and build fordiffci-cli, so it was not visible.mcpServerEntrynow has the same branch, and a new root test intests/agent-plugin-launchers.test.tschecks that init's launcher compiles and equals the plugin's (it fails without the fix). The CLI'scli-agent.test.tsMCP test passes again; its two other failures are the knownmainones (#193, #196).