zcode + open-gsd: Subagent 创建失败 - MCP 服务器连接未继承
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Report
环境信息
- 工具: zcode (远程项目模式) + open-gsd 工作流
- 系统: Windows + WSL
- 操作: 创建 subagent(如 gsd-phase-researcher、gsd-project-researcher 等)
问题描述
在 zcode 远程项目模式下使用 open-gsd 工作流时,创建 subagent 失败,提示缺少必需的 MCP 服务器连接。
Required MCP server is not connected:
- context7
- plugin_context7_context7
- firecrawl
- exa
- tavily
- ref
- jina
- perplexity
根本原因分析
问题架构:
zcode 客户端 (Windows) WSL 服务端
├─ MCP 服务器连接 ├─ Subagent 进程
├─ 主会话运行 └─ ❌ 无法访问客户端 MCP
└─ open-gsd 执行 (网络隔离)
技术原因:
- MCP 服务器架构问题:MCP 服务器在 zcode 客户端进程中连接和运行
- 进程隔离:Subagent 在 WSL 服务端作为独立进程创建,无法跨进程边界访问客户端的 MCP 连接
- 缺少传递机制:当前架构没有将 MCP 连接配置/端点从客户端传递到服务端 subagent 的机制
受影响的 Agent(均声明依赖这些 MCP 服务器):
gsd-phase-researcher- 研究阶段实现方案gsd-project-researcher- 研究领域生态系统gsd-domain-researcher- 研究业务领域gsd-ui-researcher- 产生 UI-SPECgsd-advisor-researcher- 研究灰度决策gsd-ai-researcher- 研究 AI 框架
复现步骤
- 在 zcode 中打开远程项目(WSL 模式)
- 运行需要创建 research subagent 的 open-gsd 命令(如
/gsd:plan-phase) - 观察到 subagent 创建失败的错误信息
期望行为
Subagent 应该能够:
- 继承主会话的 MCP 服务器连接
- 或者在服务端自动重新连接这些 MCP 服务器
- 或者提供优雅降级(对于可选的 MCP 服务器)
可能的解决方案
- MCP 服务器代理/转发:在服务端建立 MCP 连接的代理层
- 配置传递:将 MCP 服务器配置从客户端传递到服务端,让 subagent 自己连接
- 进程内执行:在客户端进程内创建 subagent(而非 WSL 服务端)
- 优雅降级:区分必需和可选的 MCP 服务器,提供更好的错误处理
💡 功能建议:原生 Windows 客户端
问题背景
虽然 zcode 支持 WSL 模式,但作为远程项目存在诸多不便:
用户体验问题:
- 文件系统性能:Windows ↔ WSL 跨文件系统访问慢
- 权限映射:Windows 权限与 Linux 权限映射复杂
- 工具链割裂:需要同时维护 Windows 和 WSL 两套工具
- 调试困难:跨平台的调试体验不流畅
- 资源占用:WSL 虚拟机额外开销
用户痛点:
"zcode 虽然支持 WSL 模式,但作为远程项目有诸多不便。Windows + WSL 用户,还是期望能获得更原生的体验。"
建议
请问是否有以下计划?
-
原生 Windows CLI 版本
- 直接在 Windows 上运行,无需 WSL
- 原生文件系统访问
- 与 Windows 工具链无缝集成
-
Web 版本 / 在线 IDE
- 浏览器访问,无需安装
- 云端执行,统一体验
- 适合轻量级协作和快速体验
-
跨平台桌面客户端(Electron/Tauri)
- Windows / macOS / Linux 统一体验
- 原生 GUI + CLI 双模式
- 更好的性能和集成
用户价值
对于 Windows 用户(特别是 WSL 用户):
- 性能提升:消除跨文件系统开销
- 体验一致性:与原生 Windows 工具链统一
- 学习曲线平缓:无需理解 Linux/WSL 概念
- 生产就绪:更适合作为日常开发工具
参考: 类似的工具(如 Cursor、Windsurf)都提供原生 Windows 客户端,用户体验显著优于 WSL 模式。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are identified. Start by reproducing /gsd:plan-phase in zcode's Windows-to-WSL remote-project mode, then trace how MCP connections are created in the client and how research subagents are launched in WSL. Done means subagents can inherit or reconnect the required servers, or report a defined graceful fallback for optional servers.
Written by the indexing model from the issue text.
Assessment
- Domain
- developer-experience, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100