workbuddy-subagent-bridge
This MCP server lets an agent delegate tasks to WorkBuddy and manage their lifecycle, permissions, and reports.
Start WorkBuddy sessions with an explicit working directory, prompt, optional model, permission mode, acceptance criteria, and ACP/CLI backend; optionally block until completion.
Send follow-up messages to the same session for revisions.
Inspect task/session status and pending ACP permission requests.
Reply to pending permission requests with the expected ACP payload.
Read in-memory completion reports.
Cancel active tasks or close local ACP processes.
List persisted tasks and their lifecycle status.
List available WorkBuddy models and run environment diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@workbuddy-subagent-bridge start a plan-mode task to analyze this repo and report risks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WorkBuddy Subagent Bridge
WorkBuddy Subagent Bridge 是一个本地 ACP/MCP 桥接器:
让主 Agent 通过 MCP 调用 WorkBuddy 执行任务。
把 WorkBuddy 注册为 T3 Code 的本地 ACP provider,在 T3 的模型选择器里直接使用。
主 Agent 负责理解目标、拆解任务、审批权限和验收结果;WorkBuddy 负责具体执行。任务完成后,主 Agent 可以读取报告,并继续向同一会话发送修改意见。
本项目是独立的社区工具,与 WorkBuddy 官方没有隶属关系。
适用场景
让主 Agent 把编码、文件修改或诊断任务交给 WorkBuddy。
管理多个独立的 WorkBuddy 任务,并分别查询状态和报告。
在 WorkBuddy 请求修改文件或执行操作时,由主 Agent 审批权限。
让同一 WorkBuddy 会话持续接收反馈,完成“分派—执行—验收—修订”流程。
在 T3 Code 中把 WorkBuddy 作为 provider 使用,保留模型选择、Thinking 和权限审批。
当前版本为 0.3.0,已在 Windows 上完成真实验证。变更记录见 CHANGELOG.md。
Related MCP server: workbuddy-mcp
安装
前置条件
Windows
Node.js 20 或更高版本
已安装 WorkBuddy(首次使用按下方步骤登录)
WorkBuddy GUI 的登录状态不会传递给独立启动的 CLI。首次使用前运行一次登录命令:
workbuddy-subagent login默认使用微信登录。也可用 --method external(Google/GitHub)、--method iOA(企业 iOA)或 --method selfhosted(企业域名)。浏览器未自动打开时,命令会打印登录 URL。
登录成功后,Bridge 会把 access token 保存到 %LOCALAPPDATA%\workbuddy-subagent-bridge\auth.json,并通过 CODEBUDDY_AUTH_TOKEN 传给 WorkBuddy 子进程。WorkBuddy 5.11 的 CLI 自身凭据文件使用了桌面端密钥,独立进程无法解密,因此不能直接复用;该文件属于用户凭据,不要共享或提交。token 失效后重新执行 login。
当前验证环境:WorkBuddy 5.11.3、CodeBuddy CLI 2.176.0、Node.js 24.22.1。已完成真实任务验证:plan 任务、default 权限审批(Write/Edit)、文件写入、session_send 修订和报告读取。
交由 Agent 安装
复制下面的 Prompt 发送给 Agent 即可:
安装并配置 WorkBuddy Subagent Bridge。
项目仓库:https://github.com/BenjaminNH/workbuddy-subagent-bridge
先阅读并执行仓库中的 docs/agent-install.md,完成后返回安装和验证结果。从 npm 安装
npm install -g workbuddy-subagent-bridge
workbuddy-subagent doctordoctor 会检查 Node.js、npm、WorkBuddy、CodeBuddy CLI、ACP 连接和模型目录。开始使用前,请确认关键检查项均为 ok。
doctor 会检查 Bridge 的凭据存储(auth 项);该文件由 workbuddy-subagent login 生成。
如果要在 T3 Code 中使用,继续执行 workbuddy-t3 login、workbuddy-t3 doctor 和 workbuddy-t3 install,见下方“在 T3 Code 中使用”。
从本地源码安装
npm install
npm run build
npm pack
npm install -g .\workbuddy-subagent-bridge-0.3.0.tgz
workbuddy-subagent doctor配置 MCP
生成 Codex 配置文件:
workbuddy-subagent init --client codex --output .\workbuddy-mcp.jsoninit 只生成配置文件,不会自动修改 Codex 的全局配置。请将生成的 workbuddy-subagent-bridge 条目加入 Codex 的 MCP 配置,然后重启 Codex。
如果目标文件已存在,init 默认拒绝覆盖;确认需要替换时,显式添加 --force。
在 T3 Code 中使用
0.3.0 起可以把 WorkBuddy 注册为 T3 Code 的本地 ACP provider,在 T3 的模型选择器里直接使用 WorkBuddy,而不是只作为 MCP 工具。
前置条件:
Windows
T3 Code 0.1.x(当前验证 0.1.13 Beta)
WorkBuddy 已安装并已通过
workbuddy-t3 login登录Node.js 20 或更高版本
安装并注册:
npm install -g workbuddy-subagent-bridge
workbuddy-t3 login
workbuddy-t3 doctor
workbuddy-t3 install然后退出并重启 T3 Code。T3 的 provider 列表里会出现 WorkBuddy,可以选择模型、设置 Thinking 等级和权限模式;WorkBuddy 请求修改文件时,T3 会显示审批弹窗。
常用命令:
命令 | 用途 |
| 登录 WorkBuddy 并保存 token |
| 检查 T3 设置、provider 入口、安装时写入的 CLI 与凭据路径,以及 token |
| 写入 T3 provider,并备份原设置 |
| 只打印 provider JSON,不写文件 |
| 只移除 WorkBuddy provider |
| 列出 WorkBuddy 模型目录 |
安装相关选项:
--dry-run(仅install):只打印将要写入的设置路径、备份和 provider 入口,不改动任何文件;--json:以 JSON 输出结果(install、uninstall、login、models、print-config);--t3-home <path>(install、uninstall、print-config、doctor):指定 T3 Code 主目录,默认取T3CODE_HOME或~/.t3;--provider-dir <path>(install、print-config):指定复制 ACP 包装器的稳定目录;--no-copy(install、print-config):不复制包装器,直接指向已安装的 npm 包路径。
install 会把 ACP 包装器复制到 %LOCALAPPDATA%\workbuddy-t3\provider,避免依赖 npm 缓存路径;T3 设置内容有变化时才写入,并在写入前备份为 settings.json.workbuddy-t3.<时间戳>.bak。安装目录下的 startup.log / child.log 记录诊断信息,其中的密码与 token 会被脱敏,单个文件超过 1 MiB 时轮转为 .1。
workbuddy-acp 就是被复制的那份 ACP 包装器(package.json 中声明的 bin 与安装复制出的文件相同),只用于手动调试包装器本身。直接运行时旁边没有 provider-config.json,因此不会烘焙安装时记录的路径,而是依赖当前环境变量(WORKBUDDY_CLI_PATH、WORKBUDDY_SUBAGENT_AUTH_PATH 等);诊断信息只输出到 stderr,不写日志文件。正常使用请走 workbuddy-t3 install,让 T3 Code 启动已注册的 provider。
安装后建议按以下顺序验收:provider 列表出现 WorkBuddy → 发送 Reply with exactly: T3_OK → 创建文件触发权限弹窗 → 切换 Thinking 等级 → 重启 T3 后恢复线程。
限制:
T3 Code 的本地 provider 配置不是公开插件 API;T3 升级后先运行
workbuddy-t3 doctor。WorkBuddy 目前只有 Windows 版本。
WorkBuddy 不支持
session/list/session/close,T3 的个别会话管理按钮可能报错;聊天、权限审批和session/load恢复不受影响。token 过期后重新执行
workbuddy-t3 login。
基本使用
配置完成后,主 Agent 可以创建任务:
请分析当前项目,实现指定功能,并在完成后报告修改内容和测试结果。典型流程:
使用
workbuddy_session_start创建任务。使用
workbuddy_session_status查询任务状态和待处理权限请求。使用
workbuddy_session_report读取最终报告。使用
workbuddy_session_send向同一会话发送反馈或修改要求。完成后使用
workbuddy_session_close关闭本地会话进程。
一个 MCP Bridge 可以管理多个独立任务。每个任务都有自己的 taskId、WorkBuddy session、工作目录、权限模式和报告。
模型选择
workbuddy_models 默认返回 WorkBuddy 当前 cli 模型选择器里的条目,数量随 WorkBuddy 配置变化(本机实测 3–19 个;5.11 的分层目录为 fast-model、balanced-model、deep-model)。
传 all: true 会合并缓存中的完整产品目录(当前实测 61 个,含 deepseek-v4.1-flash、glm-5.4、kimi-k3.1-pro、glm-5.3 等)。CLI 接受目录中的任意模型 ID,即使它不在当前选择器里;已实测把 deepseek-v4.1-flash、glm-5.4、kimi-k3.1-pro 直接传给 workbuddy_session_start 的 modelId,均返回 MODEL_OK。
ACP session/new 只公布选择器子集;_codebuddy.ai/models/refresh 仅对 Web UI 客户端开放(stdio 返回 web-ui-only),所以 Bridge 从产品配置缓存读取完整目录。
推理等级
workbuddy_session_start 支持 reasoningEffort:disabled、minimal、low、medium、high、xhigh、max、enabled。Bridge 通过 ACP session/set_config_option 设置 thought_level,并在 session_send 重新加载会话后再次应用。已实测 deepseek-v4.1-flash + high 完成真实检索任务。
权限模式
权限模式在创建任务时指定,默认是 plan。主 Agent 应根据任务范围选择模式。
模式 | 说明 |
| 只读分析和规划,默认模式 |
| 需要执行受限操作时逐项请求权限 |
| 自动接受文件编辑,其他操作仍受限制 |
| 由 WorkBuddy 自动判断风险 |
| 无法交互时拒绝需要询问的操作 |
| 跳过权限提示,风险较高 |
| 跳过全部权限检查,包括危险命令,风险极高 |
需要主 Agent 逐项审批时使用 default。不支持的权限模式会被拒绝,不会静默回退到其他模式。
bypassPermissions 和 fullAccess 不会被默认使用,也不会被后续 session_send 自动提升。主 Agent 应在使用前确认工作目录和任务范围。
MCP 工具
工具 | 用途 |
| 创建 WorkBuddy 任务 |
| 向同一会话发送后续反馈 |
| 查询任务状态和权限请求 |
| 读取当前任务的最终报告 |
| 回复权限请求 |
| 取消任务 |
| 关闭本地会话进程 |
| 列出任务及其状态 |
| 查询模型目录; |
| 检查本机运行环境 |
安全边界和当前限制
工作目录必须由调用方明确提供,Bridge 不自动创建 worktree 或合并 diff。
默认使用
plan,高风险权限必须在任务级别显式指定。日志只记录基础生命周期信息,不记录 prompt、结果正文、文件内容或凭据。
ACP 是多轮任务的主路径;CLI 只用于一次性任务或 ACP 启动前失败的兼容场景。
ACP prompt 已提交但结果不确定时,不会自动切换 CLI 重放。
WorkBuddy 5.11 不再写固定的
acc-product-config-v3.json。Bridge 会从~/.workbuddy/cache选择当前进程的acc-product-config-v3-<pid>-<uuid>.json,并以CODEBUDDY_HOST=workbuddy-desktop启动 CLI;找不到时回退到 ACPsession/new的内置模型列表。CodeBuddy CLI 仍未实现
session/cancel;取消任务时 Bridge 会终止该任务的 ACP 子进程,持久化 session 仍可在后续session_send时加载。如果 CodeBuddy CLI 未登录,ACP 会返回
refusal。Bridge 将任务标记为failed并返回原始错误,不会把空报告当作成功,也不会把它标成不可重放的uncertain。completed和cancelled是任务状态标签;如果 WorkBuddy 仍支持加载 session,可以继续发送反馈。报告保存在当前 Bridge 进程内。Bridge 进程重启后的无缝任务恢复不属于当前 MVP 的保证范围。
当前版本不提供远程公网 Agent 服务、A2A、多账号池、多供应商调度、自动 worktree、GUI 自动化或 OpenAI/Anthropic API 兼容层。
开发与验证
npm install
npm test
npm run typecheck
npm run build
npm run doctor问题反馈
提交问题时,请附带:
WorkBuddy 和 CodeBuddy CLI 版本
workbuddy-subagent doctor输出最小复现步骤
使用的权限模式
相关任务状态和原始错误字符串
许可证
本项目采用 MIT License。
Available Tools
10 toolsworkbuddy_doctorB
Check Node, CodeBuddy CLI, and ACP stdio initialization.
Inputs: no named parameters.
workbuddy_modelsA
List the WorkBuddy model catalog. By default returns the cli picker subset; all=true adds the full cached product catalog. Any returned modelId can be used by workbuddy_session_start, including ids that are not in the current picker.
Inputs: all.
workbuddy_session_cancelC
Cancel the active WorkBuddy session.
Inputs: taskId (required).
workbuddy_session_closeB
Close the local ACP process and mark the task completed.
Inputs: taskId (required).
workbuddy_session_permission_replyA
Reply to a pending ACP permission request. Inspect workbuddy_session_status first and pass the raw response payload expected by the current WorkBuddy version.
Inputs: taskId (required), response (required), requestId (required).
workbuddy_session_reportA
Read the in-memory report produced by a completed prompt. Reports are not persisted in the task registry.
Inputs: taskId (required).
workbuddy_session_sendC
Send a follow-up message to the same WorkBuddy session.
Inputs: taskId (required), message (required).
workbuddy_session_startA
Start a current-version WorkBuddy session. ACP mode returns a taskId immediately by default; poll status and request the report after completion. Set waitForCompletion=true when a blocking report is preferred.
Inputs: cwd (required), prompt (required), backend, modelId, +4 more.
workbuddy_session_statusA
Read task/session status and any pending ACP permission requests without sending a prompt.
Inputs: taskId (required).
workbuddy_statusA
List persisted WorkBuddy tasks and their current lifecycle status.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools target clearly distinct lifecycle operations, but workbuddy_status versus workbuddy_session_status could be confused despite description differences. workbuddy_session_cancel versus workbuddy_session_close also have related but distinguishable semantics.
The tool set uses a consistent snake_case pattern with the workbuddy prefix and mostly follow session_action names. workbuddy_models and workbuddy_doctor deviate slightly by being noun-like rather than action-oriented, but the convention remains readable.
Ten tools are well-scoped for a session bridge covering setup, model discovery, lifecycle control, status inspection, permission handling, and reporting. Each tool appears to earn its place without obvious redundancy.
The surface covers the full ACP/WorkBuddy session lifecycle: diagnostics, model listing, session start, follow-up messaging, status polling, permission replies, report retrieval, cancellation, closing, and persisted task listing. No core operation appears missing for the stated purpose.
Maintenance
Related MCP Connectors
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Agent-first task marketplace MCP — discover, claim, and deliver paid workspace tasks.
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
Work management where AI agents are first-class members: tasks, projects, memory over hosted MCP
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Claude Code to delegate coding tasks to the local Cursor Agent CLI, with persistent per-workspace sessions that resume across calls.12 npmMIT
- AlicenseAqualityDmaintenanceEnables AI coding agents like Claude Code, Codex, Cursor, and OpenCode to delegate tasks to the WorkBuddy CLI as a sub-agent via an MCP tool, with one-command setup and configurable model/permission options.112MIT
- AlicenseNot gradedqualityAmaintenanceEnables any MCP-compatible client to run reusable, Markdown-defined task agents against a chosen coding CLI backend, returning results to the same conversation and optionally continuing a session across calls.175 npmMIT
- AlicenseAqualityCmaintenanceEnables an AI agent or MCP client to delegate tasks to an installed WorkBuddy runtime through seven tools, including starting native worker sessions, sending messages, streaming public results, selecting models, loading configured MCP servers and skills, and cancelling tasks.71MIT