Repository navigation
fix(agent-core-v2): spawn Windows batch script commands through cmd.exe (#4791) - #4804
Conversation
…xe (#4791) * fix(agent-core-v2): spawn Windows batch script commands through cmd.exe * fix(agent-core-v2): harden Windows batch spawn escaping and resolution * fix(agent-core-v2): preserve native .com precedence in Windows spawn resolution * fix(agent-core-v2): reject line breaks and align env and cwd resolution in Windows batch spawn * refactor(agent-core-v2): replace custom Windows batch spawn handling with cross-spawn * chore: update lockfile for cross-spawn * chore: update nix pnpmDeps hash for cross-spawn * fix(agent-core-v2): classify process-level ENOENT during MCP startup as config error * fix(agent-core-v2): await transport exit error before classifying MCP startup failure * fix(agent-core-v2): keep native spawn for explicit-shell commands on Windows * fix(agent-core-v2): bound the MCP transport exit-error wait
🦋 Changeset detectedLatest commit: a0858bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0858bfc54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "ajv": "^8.18.0", | ||
| "ajv-formats": "^3.0.1", | ||
| "chokidar": "^4.0.3", | ||
| "cross-spawn": "^7.0.6", |
There was a problem hiding this comment.
Update the Nix pnpm dependency hash
Adding this direct dependency changes pnpm-lock.yaml, but flake.nix:155-159 still contains the parent commit's fixed-output pnpmDeps hash. Consequently, the nix build .#kimi-code step in .github/workflows/nix-build.yml:103-113 will fail with the hash-mismatch path handled at lines 121-136, blocking the Nix build until flake.nix is updated with the newly reported hash.
Useful? React with 👍 / 👎.
|
关于 Nix pnpmDeps hash 的评审意见,经核实不需要处理:
如果后续确有在 release 分支上运行 Nix 构建的需求,再按当时 CI 报告的 got hash 单独更新即可。 |
Requirement or Bug
将已合并到 main 的 #4791 cherry-pick 到
release/2026-11-10:修复 Windows 上以npx等.cmd/.bat脚本命令声明的 stdio MCP 服务器无法启动的问题。Bug Reproduction Steps
见 #4791。
Root Cause
见 #4791。
Code Changes
cherry-pick main 的 squash commit
4d44cc6ee(#4791),无额外代码改动:HostProcessService主路径改用 cross-spawn(Windows 批处理命令自动解析与cmd.exe包装);显式shell: true的命令保留原生 spawn,避免退出码被误分类;@moonshot-ai/kimi-codepatch)。唯一冲突为
flake.nix的 pnpmDepsfetcherVersion与 hash:保留 release 分支的fetcherVersion = 3,hash 待 Nix CI 给出本分支依赖集对应的值后更新。Behavior Changes and Affected Users
与 #4791 一致,无额外行为变化。
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.