cc-in-codex
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., "@cc-in-codexAsk Claude Code to refactor the payment module and run tests."
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.
cc-in-codex
中文主文档。English README: README.en.md
cc-in-codex 是一个本地 MCP server,让 Codex 可以像人类一样使用你本机已经登录好的 Claude Code,并把 Claude Code 变成一个持续陪伴当前项目的实现助手。
这个工具的目标不是再做一个一次性代码生成器,而是建立一种更高效的双 Agent 工作模式:
你只和 Codex 对话。
Codex 负责思考、拆解、判断、审查和最终汇总。
Claude Code 负责读仓库、改代码、跑测试、重构、执行命令和使用它自己的 subagent/技能体系。
同一个项目目录绑定同一个 Claude Code companion,上下文可以持续积累,也可以从 Claude Code CLI 里恢复。
目录
Related MCP server: agent-fleet
为什么需要它
Codex 和 Claude Code 的强项不完全一样。
在很多真实工程任务中,一个自然的分工是:
Codex 更适合做科学式思考、方案权衡、任务拆解、风险判断、代码审查和最终决策。
Claude Code 更适合做本地工程执行:读大量文件、改代码、跑测试、处理工具链、使用 subagent、持续推进实现。
如果每次都让 Codex 给 Claude Code 发一个孤立任务,效果会很差:
Claude Code 上下文不连续。
Codex 不知道 Claude Code 之前做过什么。
用户需要同时管理两个 Agent。
prompt 容易重复、变长、污染上下文。
出问题时缺少及时监控和止损。
cc-in-codex 解决的是这个交互问题。它让 Codex 通过 MCP 管理一个本地、持久、可恢复的 Claude Code companion。用户只需要和 Codex 对话,Codex 会在合适的时候调用 Claude Code,并负责审查 Claude Code 的结果。
核心能力
cc-in-codex 当前提供:
使用本机
claude可执行文件和本地 Claude Code 登录态,包括 Claude Max 账号。不要求新的 Anthropic API key。
每个
cwd维护一个持久 Claude Code companion。支持 SDK 后端,用于 Codex 后台委派代码任务并等待结果。
支持 TUI 后端,在
tmux里运行原生 Claude Code 全屏 CLI,用户可以实时观看或接管。支持从已有 Claude Code 会话恢复:
SDK:绑定明确的
sessionId。TUI:
claude --resume <session-id>或claude --continue。
支持 raw TUI 输入,例如
/status、/help、/clear、Escape、C-c。支持 Claude Code statusLine,读取真实
context_window信息,用于判断是否适合 compact。支持
companion_tui_compact_check和companion_tui_compact,让 compact 发生在合理节点,而不是机械触发。支持 stop-loss:SDK 后端有运行时间和 stall timeout;TUI 后端可以被 Codex 或用户显式打断。
支持项目初始化:生成共享的
AGENTS.md和CLAUDE.md,让 Codex 与 Claude Code 读取同一份项目指令。状态只存储在本地
~/.cc-in-codex/。
工作模型
cc-in-codex 的基本思想是:
User
|
v
Codex
|
| MCP tools
v
cc-in-codex
|
| local claude executable
v
Claude Code companion
|
v
Project files / tests / tools职责边界:
用户只和 Codex 对话。
Codex 是 lead agent,负责判断什么时候需要 Claude Code、给出高质量任务 prompt、监控执行、审查结果。
Claude Code 是 implementation companion,负责在本地项目里执行工程任务。
cc-in-codex是连接层,不替代 Codex,也不替代 Claude Code。
这意味着:Claude Code 的输出不是最终答案,Codex 仍然需要 review 和 synthesis。
两种后端:SDK 与 TUI
SDK 后端
SDK 是默认后端,适合日常后台委派。
特点:
Codex 调用
companion_send或companion_start。Claude Code 在 SDK/print 风格下完成任务。
Codex 可以拿到结构化结果、事件、成本、turn 数、session id。
适合代码修改、测试、审计、小型重构、只读分析。
推荐场景:
“让 Claude Code 改这个 bug,然后跑测试。”
“让 Claude Code 读这几个模块,给我一个实现报告。”
“让 Claude Code 执行一组明确的工程任务。”
TUI 后端
TUI 后端会在 tmux 中打开原生 Claude Code CLI。
特点:
你可以在 Codex 右侧终端 attach 进去,看到 Claude Code 的原生 ASCII/TUI 界面。
Codex 可以向这个 TUI 发送任务 prompt。
你也可以直接在 TUI 里打字、发 slash command、接管会话。
TUI 后端不尝试从全屏终端里“猜测任务完成”,它更像可见的远程控制。
推荐场景:
你想实时观看 Claude Code 在干什么。
任务复杂,想保留人工接管能力。
你想继续已有 Claude Code CLI 的体验。
你要使用 Claude Code 自己的 TUI 能力、slash command、resume picker 或 subagent 工作流。
怎么选
默认用 SDK。需要“看见 Claude Code 原生界面”或“人类随时接管”时用 TUI。
场景 | 推荐 |
后台执行明确任务 | SDK |
需要 Codex 等待结果并审查 | SDK |
需要实时观看 Claude Code UI | TUI |
需要手动输入 slash command | TUI |
继续最近的 Claude Code CLI 对话 | TUI |
精确绑定已有 session id | SDK 或 TUI |
系统要求
Node.js 22 或更新版本。
本机已安装并登录 Claude Code,
claude --version可运行。Codex 支持 MCP server。
TUI 模式需要
tmux。
macOS 安装 tmux:
brew install tmux确认依赖:
node --version
claude --version
tmux -V安装与构建
从源码安装:
npm install
npm run build开发检查:
npm run typecheck
npm run build
npm run smokenpm run smoke 不会启动真实 Claude 任务,也不会创建 TUI 会话。它只检查:
MCP server 能正常启动并暴露关键工具。
SDK resume 绑定逻辑可用。
CLI help 包含 resume/continue 选项。
在 Codex 中注册 MCP
把构建后的 server 注册到 Codex:
codex mcp add cc-in-codex -- node /absolute/path/to/cc-in-codex/dist/index.js查看配置:
codex mcp get cc-in-codex如果 claude 不在 PATH,可以指定:
CC_IN_CODEX_CLAUDE_PATH=/absolute/path/to/claude注册后重启 Codex,确保工具列表刷新。重启后 Codex 应该能看到 companion_send、companion_resume、companion_tui_open、companion_tui_resume 等工具。
快速开始:新项目
在一个全新项目中,推荐这样用:
用户告诉 Codex:“这个项目使用 cc-in-codex。”
Codex 调用
companion_init_project。cc-in-codex创建:AGENTS.mdCLAUDE.md
Codex 后续用
companion_send给 Claude Code 分配任务。当用户想看实时 UI 时,Codex 调用
companion_tui_open,用户在右侧终端 attach。
初始化项目:
{
"cwd": "/absolute/path/to/project"
}生成的 AGENTS.md 是 Codex 和 Claude Code 的共享项目记忆。CLAUDE.md 会提示 Claude Code 先读取 AGENTS.md。
这样做的原因是:项目指令应该写在仓库里,而不是每一轮 prompt 里重复粘贴。
继续已有 Claude Code 项目
如果一个项目本来已经用过 Claude Code,你通常不希望丢掉已有会话上下文。cc-in-codex 支持两种恢复方式。
精确恢复 session id
如果你知道 Claude Code 的 session id,可以让 SDK 后端绑定它:
{
"cwd": "/absolute/path/to/project",
"backend": "sdk",
"sessionId": "00000000-0000-0000-0000-000000000000"
}之后 Codex 再用 companion_send,就会 resume 这个 Claude Code 会话。
TUI 也可以精确恢复:
{
"cwd": "/absolute/path/to/project",
"sessionId": "00000000-0000-0000-0000-000000000000"
}这等价于在该项目里启动:
claude --resume 00000000-0000-0000-0000-000000000000继续当前目录最近一次 Claude Code 对话
如果你不知道 session id,但想继续该项目最近的 Claude Code 对话,使用 TUI:
{
"cwd": "/absolute/path/to/project",
"continueLatest": true
}这等价于:
claude --continue注意:SDK 后端需要明确 session id。--continue 是 Claude Code CLI/TUI 的语义,当前由 TUI 后端负责。
避免误替换正在看的 TUI
如果该项目已经有一个 cc-in-codex TUI pane 在运行,resume 默认不会偷偷替换它。你会得到明确错误,提示已有 tmux session。
如果你明确想关闭现有 pane 并启动恢复后的会话,传入:
{
"cwd": "/absolute/path/to/project",
"continueLatest": true,
"replaceTui": true
}这个保护很重要:用户右侧终端看到的 Claude Code 会话,必须和 Codex 正在操作的会话一致。
可见 TUI 模式
打开 TUI:
{
"cwd": "/absolute/path/to/project"
}工具返回类似:
tmux attach -t ccic-my-project-abc123def0在 Codex 右侧终端运行这条命令,就能看到原生 Claude Code TUI。
常用 tmux 操作:
Ctrl-b d detach,退出观察但不关闭 Claude Code
Ctrl-b [ 进入 scrollback
q 退出 scrollbackCodex 给 TUI 发任务时,会把 prompt 粘贴到 Claude Code CLI 并按 Enter。用户会在 TUI 中实时看到输入、输出、工具调用和 Claude Code 的交互状态。
TUI prompt 分层
TUI 后端有一个重要 UX 设计:bootstrap 与 task 分离。
第一次向一个新 TUI pane 发送任务时,cc-in-codex 会发送一段 bootstrap,建立 companion 角色:
Codex 是 lead agent。
Claude Code 是执行 companion。
当前工作目录。
权限策略。
汇报格式。
不要直接问用户,向 Codex 汇报 blocker。
后续每轮任务只发送:
Task: ...这样避免每轮都把大量身份说明塞进 Claude Code 上下文,同时新 pane 仍然能被正确初始化。
当执行 /clear 或 /compact 后,下一轮会自动重新 bootstrap。
Raw 输入
有些输入不应该被 cc-in-codex 包装成任务,例如 slash command 或控制键。使用 companion_tui_raw:
{
"cwd": "/absolute/path/to/project",
"text": "/status"
}发送 Escape:
{
"cwd": "/absolute/path/to/project",
"keys": ["Escape"],
"enter": false
}发送 Ctrl-C:
{
"cwd": "/absolute/path/to/project",
"keys": ["C-c"],
"enter": false
}Raw 输入适合:
/status/help/clear/compactEscapeC-c用户明确要求原样输入的内容
长任务 prompt 和较长 raw 输入会通过 tmux buffer 粘贴,并按输入长度动态等待后再按 Enter。这样比直接 send-keys 更适合长命令、长 slash command 或多行任务说明。
Codex 应该如何调用
这个 MCP server 是给 Codex 用的。理想行为是:
用户说“用 Claude Code 做一下这个实现”,Codex 调用
companion_send。用户说“做一个较长实现/重构/审计”,Codex 调用
companion_start,然后用返回的eventCursor调用companion_wait等进展。用户说“打开可见 TUI”,Codex 调用
companion_tui_open。用户说“继续我原来 Claude Code 的上下文”,Codex 优先判断是否有 session id;没有则用 TUI
continueLatest。用户说“看一下右边 Claude Code 在干嘛”,Codex 调用
companion_tui_screen。用户说“停掉它”,Codex 调用
companion_cancel或 TUI rawC-c。用户说“现在是否该 compact”,Codex 先调用
companion_tui_compact_check,再决定是否companion_tui_compact。
Codex 不应该:
把整个仓库摘要粘贴给 Claude Code。
每轮重复长篇身份说明。
在没有检查 checkpoint 的情况下随便 compact。
盲目信任 Claude Code 的输出而不 review。
在用户正在观察 TUI 时静默替换为另一个会话。
MCP 工具说明
通用工具
工具 | 用途 |
| 打开或恢复当前项目 companion,不发送任务 |
| 绑定已有 Claude Code session,或触发 TUI continue/resume |
| 发送短任务并等待完成 |
| 启动长任务,立即返回 run id |
| 等待长任务的新事件、完成或超时,用于 |
| 查看最近事件 |
| 查看当前 companion 状态 |
| 查看最近结果和 resume 命令 |
| 停止当前运行 |
| 忘记该 cwd 的 companion 绑定 |
| 创建共享项目指令文件 |
TUI 工具
工具 | 用途 |
| 创建或恢复可见 Claude Code TUI |
| 用 |
| 向可见 TUI 发送任务 |
| 向 TUI 发送原始文本或按键 |
| 捕获 TUI 当前屏幕文本 |
| 判断当前是否适合 compact |
| 发送带保护说明的 |
上下文、resume 与 compact
Claude Code 自己会保留上下文吗
会。Claude Code 会在本地保存可恢复的 session。cc-in-codex 不需要复制 Claude Code 的全部对话历史。
但有一个边界必须讲清楚:
Codex 不能天然看到 Claude Code 的完整历史。Codex 能看到的内容来自:
MCP 工具返回的结构化结果。
companion_recent保存的事件摘要。companion_tui_screen捕获的当前 TUI 屏幕。AGENTS.md/CLAUDE.md/ 项目文件。statusLine 快照。
所以 cc-in-codex 的设计是:
Claude Code 的完整上下文由 Claude Code 自己维护。
Codex 的当前判断依赖 MCP 暴露出来的高信号状态。
重要项目知识应该进入
AGENTS.md,而不是只存在某次终端滚动记录里。
resume 的目的
resume 不是为了把所有历史复制给 Codex,而是为了让 Claude Code 自己继续原来的上下文。
当 Codex 调用 companion_send 时,SDK 后端会用已绑定的 session id resume。TUI 后端则可以启动 claude --resume 或 claude --continue。
compact 的原则
compact 不是越频繁越好。好的 compact 应该发生在:
当前任务已经汇报完成。
测试或验证结果明确。
没有正在运行的命令。
没有审批弹窗或未完成交互。
上下文压力已经中高,继续保留完整 transcript 的收益下降。
推荐流程:
先调用
companion_tui_compact_check。看
checkpointReady和recommendation。只有推荐
compact_now,或用户明确要求时,才调用companion_tui_compact。
companion_tui_compact 会发送带保护说明的 /compact,要求 Claude Code 保留:
companion 分工关系。
当前项目状态。
最近关键决策。
未完成任务。
验证状态。
blocker。
用户可见工作流假设。
状态栏与上下文压力监控
Claude Code 支持 statusLine。配置后,Claude Code 会把包含 context_window 的 JSON 发给命令。cc-in-codex 可以保存这些快照,用于更准确判断上下文压力。
在 Claude Code settings 中加入:
{
"statusLine": {
"type": "command",
"command": "node /absolute/path/to/cc-in-codex/dist/index.js statusline"
}
}配置后,快照会写到:
~/.cc-in-codex/statusline/companion_tui_compact_check 会优先使用 statusLine 的真实 context_window.used_percentage。如果没有配置,它会退回到屏幕长度和事件数量的启发式判断。
压力等级当前逻辑:
used_percentage >= 75:highused_percentage >= 60:medium其他:low
如果没有 statusLine:
事件很多、屏幕内容很长、字符数很高时提高压力等级。
这是保守估计,不是精确 token 读数。
安全与权限模型
默认策略是 balanced。需要注意:SDK 后端和 TUI 后端的安全边界不同。
SDK 后端通过 Claude Agent SDK 的工具许可回调做拦截,因此可以执行较强的工具级策略。TUI 后端运行的是原生 Claude Code CLI,cc-in-codex 负责可见启动、发送 prompt、发送 raw key、读取屏幕和打断,但不能在 MCP 层对 TUI 内部每一次工具调用做同等级别的路径拦截。
maxBudgetUsd 是 SDK 单轮调用的可选止损参数,不会作为项目默认配置持久化。Claude Max/subscription 的正常个人工作流建议省略它,主要依靠 maxRuntimeMs、stallTimeoutMs、TUI 可见监控和人工 C-c 止损。
mode
mode | 含义 |
| SDK 后端阻止 mutating tools;TUI 后端把只读意图写入 companion prompt,但仍需依赖 Claude Code CLI 权限和人工监控 |
| 允许在项目目录内进行正常工程修改 |
permissionPolicy
policy | 含义 |
| SDK 默认策略,允许本地项目工作,并尽量阻止检测到的 cwd 外路径 |
| SDK 只允许 |
| 更信任 Claude Code 和本地环境 |
| 显式跳过 Claude Code 权限确认;SDK 使用 |
SDK 只读模式会阻止:
BashEditMultiEditWriteNotebookEdit
SDK balanced 会检查常见路径参数,发现 cwd 外路径时拒绝。
TUI 后端的安全策略更接近“可见远程控制”:
用户可以 attach 到同一个
tmuxpane 实时观看。Codex 可以用
companion_tui_screen检查状态。出现危险命令、错误循环、权限循环或用户要求停止时,Codex 可以发送
C-c。TUI 内部实际工具权限仍由 Claude Code CLI、项目设置、用户确认和本地环境共同决定。
如果要让 TUI 以
bypass启动,必须新建或replaceTui:true重建 pane;已经存在的 Claude Code TUI 不能事后改变启动权限参数。
注意:任何本地自动化工具都不能替代用户和 Codex 的审查。对于高风险命令、跨目录写入、删除操作、发布操作,Codex 应该保持明确审查。
本地状态与隐私
cc-in-codex 使用本地 Claude Code 登录态,不引入新的云端账户。
本地状态位置:
~/.cc-in-codex/state.json
~/.cc-in-codex/statusline/state.json 保存:
cwd 到 companion 的绑定。
Claude Code session id。
tmux session 名称。
attach command。
最近事件摘要。
最近结果。
配置项。
它不试图保存 Claude Code 的完整 transcript。完整 Claude Code session 由 Claude Code 自己维护。
CLI 用法
cc-in-codex 默认作为 MCP server 从 stdio 启动。
statusline
Claude Code statusLine 调用:
cc-in-codex statusline通常不需要手动执行。
attach
打开或 attach 项目的 TUI:
cc-in-codex attach /absolute/path/to/project继续该项目最近的 Claude Code 对话:
cc-in-codex attach /absolute/path/to/project --continue恢复指定 session:
cc-in-codex attach /absolute/path/to/project --resume <session-id>关闭已有 cc-in-codex tmux pane 后再启动:
cc-in-codex attach /absolute/path/to/project --continue --replace查看帮助:
cc-in-codex attach --help开发与发布前检查
发布前必须跑:
npm run typecheck
npm run build
npm run smoke
npm pack --dry-run推荐额外检查:
npm audit --audit-level=moderate
git status --shortnpm pack --dry-run 应该只包含:
dist/scripts/smoke.mjsREADME.mdREADME.en.mdLICENSEpackage.json
不要把 node_modules/、本地状态、日志、临时包、测试残留发布出去。
当前 .gitignore 已忽略:
node_modules/
dist/
.DS_Store
.cc-in-codex/
*.log常见问题
这个工具会不会影响我平时直接用 Claude Code
不会。它使用你本机已有的 claude 命令和 Claude Code 本地 session。你仍然可以正常打开 Claude Code CLI。
我能在 Claude Code CLI 里 resume 到 cc-in-codex 创建的对话吗
可以。companion_status 和 companion_result 会返回:
claude --resume <session-id>你可以在终端里执行这条命令。
Codex 能不能看到 Claude Code 的完整历史
不能天然看到。Codex 只能看到 MCP server 暴露的结果、摘要、屏幕捕获和项目文件。Claude Code 的完整上下文由 Claude Code 自己保留。
TUI 是否实时同步
是。TUI 模式下,Claude Code 运行在 tmux 中。你 attach 到同一个 tmux session 后,会看到同一个原生 Claude Code 界面。Codex 发 prompt 时,输入会真实出现在这个界面里。
我能不能自己在 TUI 里打字
可以。你和 Codex 操作的是同一个 Claude Code TUI。需要注意的是,如果你手动改变了状态,Codex 可能需要通过 companion_tui_screen 或 companion_status 重新确认。
为什么 TUI send 不等待任务完成
因为 Claude Code TUI 是全屏交互界面,当前没有稳定结构化信号能证明“任务已完成”。cc-in-codex 选择保守:负责发送、监控、截图、打断,但不假装能完美解析 TUI 状态。
SDK 和 TUI 是同一个进程吗
不是。SDK 后端和 TUI 后端是两条调用路径,但它们可以通过 Claude Code session id 连接到同一个会话上下文。TUI 可以用于观察/接管,SDK 适合结构化后台任务。
为什么需要 AGENTS.md 和 CLAUDE.md
因为项目长期指令应该进入仓库,而不是每次通过 prompt 重复注入。AGENTS.md 是 Codex 和 Claude Code 的共享项目记忆,CLAUDE.md 指向它。
没有 tmux 可以用吗
可以用 SDK 后端。只有 TUI 后端需要 tmux。
statusLine 是必须的吗
不是。没有 statusLine 也能用。但配置 statusLine 后,compact check 能看到更准确的上下文窗口压力。
当前边界
这是一个本地优先的开发者工具,当前刻意保持简单。
已知边界:
TUI 后端不保证自动判断任务完成。
SDK 后端的
--continue语义需要明确 session id;最近会话 continue 由 TUI 后端负责。statusLine 依赖 Claude Code 提供的 JSON 字段,字段变化时可能需要适配。
balanced路径检查覆盖常见工具参数,但不是形式化沙箱。这个项目不替代 Codex 的最终 review。
推荐工作流
普通代码任务
用户向 Codex 描述目标。
Codex 拆解任务。
Codex 调用
companion_send。Claude Code 修改代码并运行检查。
Codex review diff 和验证结果。
Codex 向用户汇报。
复杂实现任务
Codex 先用 SDK 或本地工具读关键上下文。
Codex 打开 TUI:
companion_tui_open。用户 attach 到右侧终端观看。
Codex 用
companion_tui_send发送高质量任务。Codex 定期用
companion_tui_screen检查状态。出现错误循环或危险命令时,Codex 用
C-c止损。任务完成后,Codex review 代码并跑最终检查。
长期项目
初始化
AGENTS.md和CLAUDE.md。把稳定项目知识写入
AGENTS.md。让 Claude Code companion 持续在同一 cwd 工作。
高压前在 checkpoint 做 compact。
必要时通过
claude --resume <session-id>手动接管。
开源协议
MIT。见 LICENSE。
Available Tools
18 toolscompanion_cancelCancel CompanionA
Cancel the currently running companion turn for a cwd, if any.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It states the operation is conditional ('if any') and scoped to a cwd, but it does not describe side effects, whether it is asynchronous, what happens to the turn after cancellation, or error/return behavior. This is a minimum viable disclosure with clear gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the action and target. Every word contributes meaning: 'currently running' and 'if any' are valuable qualifiers. There is no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one optional string parameter and no output schema, and the description covers the core action. However, it lacks context about what happens after cancellation, how the cwd parameter is used, and any relation to sibling tools. It is adequate but leaves important operational details implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for its single parameter, and the description only mentions 'cwd' without explaining its meaning, format, or optionality. Since required parameters are 0, it is ambiguous whether omitting cwd applies globally or would fail. The description does not sufficiently compensate for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action (cancel) and the target resource (currently running companion turn for a cwd). The phrase 'if any' adds a conditional that clarifies behavior. It is easily distinguishable from sibling tools like companion_send, companion_wait, and companion_reset.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (when a companion turn is running for a cwd) but does not explicitly mention alternatives or when not to use it. There is no guidance around prerequisites or differences from sibling tools like companion_reset or companion_wait.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_init_projectInitialize Shared Project ContextA
Create AGENTS.md and CLAUDE.md in the project cwd so Codex and Claude Code share the same project instructions. Existing files are skipped unless force=true.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| force | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It transparently states that files are created, existing files are skipped, and the 'force' flag changes this behavior. This is sufficient for a file-initialization tool, though it could mention whether force overwrites rather than merges.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that front-loads the primary action and integrates the key conditional behavior. No unnecessary words or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple with two parameters and no output schema. The description covers purpose, file behavior, and the force parameter, making it complete enough for an agent to invoke correctly. Minor gaps around cwd defaults do not significantly reduce completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate for missing property descriptions. It effectively explains 'force' ('Existing files are skipped unless force=true') and implies 'cwd' as the project directory. However, it does not explain cwd's default value or whether it is required, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Create') and names the exact resources ('AGENTS.md and CLAUDE.md') and location ('project cwd'). It clearly distinguishes this tool from siblings like companion_reset or companion_open, which serve different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states why to use the tool ('so Codex and Claude Code share the same project instructions') and the condition for existing files, implying it is meant for project initialization. It does not explicitly name alternatives or when not to use it, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_openOpen CompanionB
Create or restore the persistent Claude Code companion for a project cwd. This does not send work to Claude.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only states one behavioral aspect ('does not send work to Claude') and the adjective 'persistent.' It fails to disclose side effects like creating background processes or state persistence details, which are important for an open/create operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences. The first states the core purpose, the second clarifies a critical behavioral distinction. No filler or redundancy; every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 15 parameters, no output schema, and no annotations, so the description must be richer to be complete. It does not explain what the result of a successful call looks like, when to use this over companion_start, or any prerequisites. For a complex stateful op, two sentences are insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the tool description adds no direct parameter info, but it does provide a helpful semantic clarification ('does not send work to Claude') that indirectly informs parameter intent (e.g., maxTurns, maxBudgetUsd are for later sends). Baseline of 3 is appropriate when the schema fully documents parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb-resource combination ('Create or restore the persistent Claude Code companion') and adds a scope ('for a project cwd'). It also clarifies that it does not send work, distinguishing it from companion_send, but does not explicitly differentiate from companion_start or companion_tui_open.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when you need to create or restore a companion for a project. The phrase 'This does not send work to Claude' gives a negative guideline (don't use to send work), but there are no explicit alternatives or exclusion criteria relative to sibling tools like companion_start or companion_resume.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_recentRecent Companion ContextA
Read recent events from the persistent companion, similar to scrolling the Claude Code window.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. 'Read' implies a non-destructive operation, and the analogy suggests a historical view, but the description does not mention any prerequisites (e.g., initialized companion), what exactly constitutes 'recent events', or any potential side effects. This leaves moderate gaps in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that is front-loaded with the action and resource, and it ends with a helpful analogy. Every word contributes value, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and no output schema, the description is relatively minimal. It conveys the core purpose but omits parameter semantics and any mention of the return format or behavior when no events are available. It is adequate for a basic understanding but not fully complete for a tool with optional parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description offers no explanation for the parameters 'cwd' and 'limit'. While 'limit' might be inferred as a count limiter, its exact scope and the role of 'cwd' (whether it scopes the companion context or file system) remain ambiguous. The description fails to compensate for the schema's lack of documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the explicit verb 'Read' and a specific resource ('recent events from the persistent companion'), making the tool's primary function clear. The analogy 'similar to scrolling the Claude Code window' further clarifies the nature of the operation and distinguishes it from sibling tools like companion_send or companion_reset.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The analogy provides clear contextual guidance on when to use this tool (to review recent context like scrolling a window), but it stops short of explicitly stating when not to use it or naming alternative tools. This is clear context without exclusions, fitting a 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_resetReset CompanionA
Forget the project-to-Claude-session binding for a cwd. Use only when the user wants a fresh Claude Code companion.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the core action (forgetting the binding) but does not specify whether the active companion process is terminated, whether the action is reversible, or any side effects on existing sessions. This leaves ambiguity for a destructive-sounding reset operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loading the action, then providing a usage condition. There is no filler or redundancy; every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and no output schema, the description covers purpose and usage, but it leaves unanswered questions about side effects, return value, and cwd default behavior. The lack of annotations makes these gaps more significant.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no property descriptions (0% coverage) and the cwd is optional (0 required). The description mentions cwd as the target of the operation, which adds some meaning, but it does not explain the value format, what it represents beyond the abbreviation, or the behavior when omitted.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Forget' and clearly names the resource ('project-to-Claude-session binding') scoped to a cwd. This distinguishes it from sibling tools like companion_init_project or companion_resume, and the added phrase 'fresh Claude Code companion' clarifies its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides an explicit when-to-use: 'Use only when the user wants a fresh Claude Code companion.' However, it does not name alternative tools or describe when-not-to-use, so it falls short of fully explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_resultCompanion ResultB
Read the latest companion result, resume command, and session metadata for a cwd.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It clearly states this is a 'Read' operation, implying non-destructive behavior, and lists the data fields it returns. However, it does not disclose whether reading consumes the result, what happens when no result exists, or any other side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant words. It packs the action, the three types of data returned, and the scoping context into exactly 12 words, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read tool, the description lists the return fields (result, resume command, session metadata) but omits edge cases like empty results or default cwd behavior. No output schema or annotations exist to provide additional context, so the description is only minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, cwd, is given semantic meaning through 'for a cwd', indicating it is the working directory context. However, the description does not clarify whether cwd is optional, what default is applied, or the expected path format, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Read' and identifies the exact resources: 'latest companion result, resume command, and session metadata' scoped to 'a cwd'. It is clear and likely distinguishes from sibling tools, though it does not explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus companion_recent, companion_status, or companion_resume. There is no mention of preconditions, such as having run a companion command first, or when another tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_resumeResume Existing Claude Code SessionA
Bind cc-in-codex to an existing Claude Code conversation. SDK needs sessionId; TUI can use sessionId or continueLatest:true.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| sessionId | No | Existing Claude Code session id to bind/resume, equivalent to `claude --resume <session-id>`. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| replaceTui | No | For the TUI backend: close the existing tmux pane before launching the requested resumed conversation. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| continueLatest | No | For the TUI backend only: launch Claude Code with `--continue` for the most recent conversation in this cwd. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden of disclosing side effects, prerequisites, and lifecycle behavior. It only states the binding action and one parameter requirement, omitting whether resuming modifies the current companion state, launches tmux, or has destructive implications. This is a significant gap for a tool with 18 parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and followed by a key usage pattern. No wasted words; it is appropriately compact for the purpose it serves.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 18 parameters, no output schema, and no annotations, the description is far too thin. It does not explain what happens on resume, what the tool returns, potential side effects, or how it differs from sibling resume tools. The agent is left to infer these from parameter names and schema descriptions, which is risky for such a complex tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds cross-parameter value by explicitly tying sessionId and continueLatest to specific backends, which is not immediately obvious from scanning the schema descriptions independently. This helps the agent select the right parameter combination.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'Bind cc-in-codex to an existing Claude Code conversation,' which clearly states the verb and resource. The second sentence adds backend-specific nuance (SDK vs TUI), but it does not explicitly differentiate from the sibling tool companion_tui_resume, which may cover a TUI-only resume path.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance by backend: 'SDK needs sessionId; TUI can use sessionId or continueLatest:true.' This tells the agent what parameter is required in each mode. However, it does not explicitly state exclusions or when to use a different companion tool (e.g., companion_start for new sessions).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_sendSend To CompanionA
Send a short task or follow-up to the persistent Claude Code companion and wait for completion. For long coding work, prefer companion_start plus polling.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| prompt | Yes | Task or follow-up for Claude Code. Keep it goal-oriented; do not paste large repo summaries. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the blocking behavior ('wait for completion') and scopes the task as 'short,' providing some behavioral context. However, with no annotations, it does not mention potential side effects, permission requirements, prerequisites (e.g., an already-running companion), or what happens on failure. This leaves a notable transparency gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exactly two sentences: the first states the core purpose and behavior, the second provides the key usage alternative. Every word earns its place, with no redundant or tangential information. It is front-loaded and easily scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 16 parameters and no output schema, the description explains the high-level usage and when to prefer an alternative. It doesn't explicitly describe the return value after 'wait for completion' (whether it returns the final result or just status), but the sibling tools like companion_result and companion_status partially fill that context. The description is sufficient for selecting the tool, though not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (16/16 parameters documented), so the baseline is 3. The description adds no parameter-specific meaning beyond the schema, but it does reinforce the 'short task' intent that aligns with the prompt parameter. This is adequate given the schema already carries full parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Send a short task or follow-up to the persistent Claude Code companion and wait for completion.' It clearly distinguishes from sibling tools by stating, 'For long coding work, prefer companion_start plus polling.' This unequivocally identifies the tool's scope and differentiates it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('short task or follow-up') and when not to ('long coding work'), naming the alternative (companion_start plus polling). This gives clear, actionable guidance on tool selection with a direct contrast against a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_startStart Companion RunA
Start a background Claude Code companion run for this cwd. Returns quickly with runId; use companion_status/recent/result to monitor.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| prompt | Yes | Task or follow-up for Claude Code. Give goals, constraints, and acceptance criteria. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must carry the behavioral disclosure burden. It reveals that the run is background, returns quickly with a runId, and should be monitored via other tools. This conveys asynchronous behavior and the need for polling. However, it does not mention potential side effects like process spawning, resource consumption, or backend-specific behaviors (e.g., tmux sessions for TUI backend), which are covered in the schema but not flagged as important behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two sentences and front-loads the primary action. The first sentence states what the tool does; the second explains the return value and directs to monitoring tools. No wasted words. It is ideal in length and structure for a tool with a rich schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 16 parameters and a rich schema, the description is concise but sufficient: it covers the core flow (start, get runId, monitor). It does not explicitly mention the distinction between new runs vs resuming/sending, but sibling names and schema cover that. It also doesn't highlight backend/security considerations, but those are in the schema. The description is complete enough for an AI agent to understand the tool's role without being verbose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 16 parameters with detailed descriptions. The tool description itself adds no parameter-related information, but the baseline of 3 applies because the schema does the heavy lifting. The description does not need to repeat parameter details, but it also doesn't add any extra semantic context (e.g., which parameters are most commonly used together).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: 'Start a background Claude Code companion run for this cwd.' This clearly identifies the verb (start), resource (companion run), and scope (current working directory). It also distinguishes itself from sibling tools by mentioning the returned runId and directing to companion_status/recent/result for monitoring, which differentiates it from companion_send or companion_resume.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to use companion_status/recent/result to monitor after starting, which is clear post-use guidance. However, it does not explicitly state when not to use this tool (e.g., preferring companion_send for follow-ups or companion_resume for existing runs), so it lacks explicit exclusions. Still, the context of 'background run' and 'returns quickly' implies asynchronous starting, which is helpful.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_statusCompanion StatusC
Inspect the current companion session for a cwd.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Inspect' implies a read-only operation, but it does not disclose what information is returned, whether any side effects occur, or the format of the session details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence with no redundant words, which is concise. However, it is under-specified, and the lack of detail makes it less useful; conciseness alone does not compensate for missing critical information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one parameter and no output schema, but the description still fails to mention what the inspection returns. For a status tool, agents need to know the result format and behavior, which is entirely absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, and the description only names 'cwd' in passing ('for a cwd'). It adds little meaning beyond the variable name itself, failing to explain the parameter's format, optionality, or expected values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Inspect' and identifies the resource 'current companion session' with a scope 'for a cwd', making the core action clear. It differs from sibling tools like companion_send or companion_reset by indicating a read-only action, though it does not explicitly distinguish all siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives, no mention of exclusions or prerequisites. With 17 sibling tools all prefixed 'companion_', the description provides no contextual cues for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_compactCompact Claude Code TUI ContextA
Ask the visible Claude Code TUI to run /compact with cc-in-codex-aware preservation instructions. Prefer companion_tui_compact_check first.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| instructions | No | Optional extra instructions for what Claude Code should preserve during /compact. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It discloses the action ('run /compact') and mentions 'preservation instructions,' but does not explain potential consequences, side effects, or whether the operation is reversible. This is similar to a mutation tool lacking safety context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the action and ending with a practical directive. Every word earns its place with no redundant detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema or annotations, and the tool invokes a compaction action. The description lacks prerequisites, what the user should expect, and how the instruction parameter affects behavior, leaving significant gaps for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only 50% of parameters (instructions) have schema descriptions; cwd is undocumented. The description mentions 'preservation instructions' but does not clarify parameter roles or how cwd is used, failing to compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb phrase 'Ask the visible Claude Code TUI to run /compact' and clearly identifies the resource and action. It distinguishes itself from sibling tools by naming the exact /compact operation and explicitly preferring companion_tui_compact_check first.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states 'Prefer companion_tui_compact_check first,' providing an alternative tool and a when-not-to-use signal. However, it does not fully explain prerequisites like whether a TUI must be visible or when compaction is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_compact_checkCheck Claude Code TUI Compact ReadinessA
Inspect the visible Claude Code TUI and cc-in-codex metadata to decide whether this is a good checkpoint to run /compact. This is a heuristic, not a true token-limit reading.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| lines | No | Recent pane lines to inspect. Defaults to 500. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the burden. It adds a key caveat ('heuristic, not a true token-limit reading') which prevents over-reliance. However, it doesn't explicitly state whether the tool is read-only or has side effects, nor describe the output format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action and purpose. The second sentence adds a necessary caveat. No wasted words, well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple with optional parameters, but there is no output schema. The description doesn't explain the return value (e.g., boolean, score, message), which an agent would need to act on the result. It also doesn't mention prerequisites like whether the TUI must be open. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema documents 'lines' well with default and constraints, but 'cwd' has no description. The description text doesn't add meaning for either parameter, and with 50% schema coverage it doesn't compensate for the undocumented 'cwd' parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: inspecting the TUI and metadata to decide checkpoint readiness for /compact. It uses a specific verb ('inspect') and resource, and distinguishes itself from sibling tools like companion_tui_compact (which actually runs compact) and companion_tui_screen (which views the screen).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage as a pre-check before running /compact, and warns that it is heuristic rather than a true token-limit reading. It doesn't explicitly name alternatives or exclusions, but the purpose is clear enough for an agent to infer when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_openOpen Visible Claude Code TUIC
Create or restore a native Claude Code CLI in tmux for this project. Returns the attach command for the side terminal.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose side effects. It mentions tmux and the attach command, but does not state whether it spawns persistent sessions, requires tmux to be installed, has permission implications, or what happens if a session already exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences deliver the core action and the return value without any filler. The content is front-loaded and every word contributes useful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 15 parameters, no annotations, and no output schema, the description is too thin. It gives only a minimal return-value note and omits operational context, error handling, prerequisites, and relationships to sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the individual parameter descriptions (mode, backend, permissionPolicy, etc.) are detailed, so the schema carries most semantic weight. The tool description adds no parameter-level meaning, which is acceptable under the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verb phrases like 'Create or restore' and names the resource 'native Claude Code CLI in tmux', clearly identifying the tool's function. It still doesn't explicitly distinguish from companion_tui_resume, which likely also restores sessions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus siblings like companion_tui_resume, companion_open, or companion_tui_send. The description states what it does but not when it should be preferred or what prerequisites are needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_rawSend Raw Input To Claude Code TUIA
Send literal text and/or tmux key names to the existing Claude Code TUI pane without the cc-in-codex wrapper. Use for slash commands (e.g. /clear), control keys (C-c), or Escape. Requires an open tui session.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| keys | No | tmux key names sent after text, e.g. ["Enter"], ["C-c"], ["Escape"]. | |
| text | No | Literal text pasted into the pane as-is (no cc-in-codex framing). | |
| enter | No | Press Enter after the input. Defaults to true for a plain text send with no keys. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses key behaviors: sending literal text/tmux keys, not using the wrapper, and requiring an open session. It lacks details on failure modes or side effects like focus changes, making it adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences cover purpose, examples, and prerequisite with no unnecessary wording. Information is front-loaded in the first sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple raw-input tool with no required params or output schema, the description provides purpose, usage examples, and a prerequisite. It doesn't address behavior when no TUI session exists, but given the low complexity, it's mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers 75% of parameters with descriptions (keys, text, enter). The description adds context by mentioning slash commands and control keys, but does not clarify the 'cwd' parameter, which lacks a schema description. Thus it is baseline adequate but not compensating for gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Send') and resource ('existing Claude Code TUI pane') and differentiates from siblings by noting 'without the cc-in-codex wrapper.' Examples of use cases further clarify its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It specifies when to use it ('Use for slash commands (e.g. /clear), control keys (C-c), or Escape') and states the prerequisite ('Requires an open tui session'). However, it does not explicitly name alternative tools or state when not to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_resumeResume Existing Session In Visible TUIB
Launch the visible tmux-hosted Claude Code CLI with --resume <sessionId> or --continue, then bind it to this project companion.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| sessionId | No | Existing Claude Code session id to bind/resume, equivalent to `claude --resume <session-id>`. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| replaceTui | No | For the TUI backend: close the existing tmux pane before launching the requested resumed conversation. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| continueLatest | No | For the TUI backend only: launch Claude Code with `--continue` for the most recent conversation in this cwd. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the primary behavior (launching a visible tmux CLI) but does not mention side effects such as replacing existing panes, permission implications, or how the binding behaves. It is not misleading, but it is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence with no redundant words. It front-loads the key action (launching the CLI) and clearly communicates the resume/continue options. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 18 parameters, no output schema, and no annotations, the description is too sparse. It does not explain the tool's role in the companion workflow, what happens after launch (e.g., does it block, return a session ID?), or how it relates to the many sibling tools. The schema is rich, but the description alone is insufficient for an agent to fully understand the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% description coverage for all 18 parameters, so the description need not add parameter details. It does not, but the high schema coverage establishes a baseline of 3. The description adds no additional parameter semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool launches a visible tmux-hosted Claude Code CLI with `--resume <sessionId>` or `--continue` and binds it to the project companion. This uses a specific verb+resource and distinguishes it from siblings like companion_tui_open (new session) and companion_resume (non-TUI).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives. It simply states what it does, without indicating context, prerequisites, or exclusions. Sibling names suggest related tools but are not referenced, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_screenRead Visible Claude Code TUI ScreenB
Capture recent text from the persistent tmux-hosted Claude Code TUI so Codex can monitor what the user sees.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| lines | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies read-only behavior through 'capture' and 'monitor', but doesn't explicitly state that it doesn't modify the TUI or describe what happens if the TUI isn't running. It adds some context about persistence and tmux-hosting, but lacks deeper behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the tool's action, target, and purpose. It is front-loaded with the key verb 'capture' and includes essential context without unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no annotations and no output schema, so the description must explain parameters, return format, and edge cases. It explains the core purpose but omits what cwd and lines mean, what the returned text looks like, and any failure behavior. This is insufficient for reliable invocation in the given sibling context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no descriptions for cwd or lines, and the tool description does not mention either parameter. With 0% schema coverage, the description fails to explain what these parameters control, leaving the agent to guess their meaning and constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool captures recent text from a persistent tmux-hosted Claude Code TUI, with a specific purpose of monitoring what the user sees. This distinctly separates it from sibling tools that send commands or manage the TUI, so the verb and resource are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (for monitoring what the user sees), which gives some context. However, it doesn't explicitly exclude alternatives like companion_tui_raw or companion_recent, nor does it provide explicit when-not-to-use guidance. The use case is clear but not fully differentiated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_tui_sendSend To Visible Claude Code TUIA
Paste a prompt into the persistent native Claude Code TUI and press Enter. Returns immediately with the tmux attach command.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project working directory. Defaults to the MCP server cwd. | |
| mode | No | SDK backend: read-only denies mutating tools; workspace-write may edit files. TUI backend receives this as visible companion context and still relies on Claude Code CLI/user supervision. | |
| model | No | Optional Claude model override. Omit to use Claude Code defaults. | |
| title | No | Human-readable companion title. | |
| effort | No | Optional Claude effort override. Defaults to high. | |
| prompt | Yes | Task or follow-up for Claude Code. It is pasted into the visible Claude Code CLI. | |
| backend | No | Companion backend. sdk is the default managed Claude Agent SDK path; tui opens a native Claude Code CLI in tmux. | |
| maxTurns | No | Optional max agent turns for a single send. | |
| claudePath | No | Optional local Claude Code executable path. Defaults to the local `claude` on PATH. | |
| allowedTools | No | Optional auto-allowed Claude Code tools. | |
| maxBudgetUsd | No | Optional SDK USD stop-loss cap for a single Claude turn. Omit for normal Claude Max/subscription workflows unless you explicitly want a hard per-turn cap. | |
| maxRuntimeMs | No | Stop-loss wall clock timeout for a single run. | |
| stallTimeoutMs | No | Stop-loss timeout when no Claude SDK progress events arrive. | |
| disallowedTools | No | Optional tools removed from use. | |
| tmuxSessionName | No | Optional tmux session name for the tui backend. Defaults to a stable project-derived name. | |
| permissionPolicy | No | SDK backend policy: balanced allows local project work and blocks detected out-of-cwd paths; trusted allows all non-disallowed tools; strict allows only allowedTools; bypass uses Claude Code bypassPermissions. TUI bypass starts Claude Code with --dangerously-skip-permissions, but existing TUI panes must be recreated for launch flags to change. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must carry the burden. It discloses that the tool pastes the prompt and returns immediately with an attach command, which is key non-obvious behavior. However, it does not disclose potential side effects such as file modifications or tool execution by Claude Code, nor does it mention permission policies or stop-losses.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, front-loaded with the action and followed by the key return behavior. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 16 parameters and no output schema, the description is minimal but does explain the return value (tmux attach command). However, it lacks prerequisite context (e.g., existing TUI session) and doesn't mention the backend flexible options or interplay with sibling tools, which is a gap for a complex tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds no parameter-level information, but the schema already documents all 16 parameters with clear descriptions, including enums and defaults. No additional clarification is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Paste') and resource ('persistent native Claude Code TUI'), and explicitly notes the immediate return of the tmux attach command. This clearly distinguishes it from sibling tools like companion_tui_open or companion_send.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It does not mention that an existing TUI session is needed or that companion_tui_open should be used to create one. The only implied context is 'persistent,' but there are no explicit exclusions or alternative references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
companion_waitWait For Companion ProgressB
Wait until the companion emits events after sinceCursor, finishes, or timeoutMs elapses. Use after companion_start for smoother progress updates.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| timeoutMs | No | How long to wait for new progress. Defaults to 60000 ms; max 300000 ms. | |
| sinceCursor | No | Only return events with id >= sinceCursor. companion_start returns eventCursor for this. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the disclosure burden. It reveals the blocking behavior (waits for events, finish, or timeout) but omits return value, error handling, or side effects on the companion process. This is partial transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main action and a practical usage hint. No redundant content; every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, yet the description does not explain what the caller receives (e.g., events, status). It also omits timeout behavior (return vs. throw) and the purpose of cwd. These gaps are significant for a wait operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema documents timeoutMs and sinceCursor, but cwd has no description anywhere. The tool description adds no parameter meaning beyond referencing sinceCursor. With 67% schema coverage and no compensatory detail, parameter semantics are underdeveloped.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool waits for companion events, finish, or timeout, and references sinceCursor, making the action specific. It does not explicitly differentiate from sibling tools like companion_status or companion_recent, but the core purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Use after companion_start' provides a clear usage context, indicating when in the workflow this tool applies. It lacks explicit exclusions or alternative tool comparisons, so it does not fully meet the top tier.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
18 tool updates
v0.1.0- First observed
companion_cancel - First observed
companion_init_project - First observed
companion_open - First observed
companion_recent - First observed
companion_reset - First observed
companion_result - First observed
companion_resume - First observed
companion_send - First observed
companion_start - First observed
companion_status - First observed
companion_tui_compact - First observed
companion_tui_compact_check - First observed
companion_tui_open - First observed
companion_tui_raw - First observed
companion_tui_resume - First observed
companion_tui_screen - First observed
companion_tui_send - First observed
companion_wait
TDQS
Scored across 18 tools
Most tools have clearly distinct purposes, but the SDK vs TUI variants (e.g., companion_open vs companion_tui_open, companion_send vs companion_start vs companion_tui_send) could be confused by an agent despite descriptions clarifying the differences. Overall, the boundaries are mostly clear.
All tools follow a consistent 'companion_<verb>[_noun]' pattern using snake_case, with optional 'tui' prefixes for TUI-specific actions. This makes the tool set highly predictable and easy to navigate.
With 18 tools, the set is in the 16-25 range that feels heavy. Many tools exist in both SDK and TUI variants, inflating the count, though each serves a genuine purpose for the dual interfaces.
The tool set covers the full lifecycle of a companion: create/restore, send/start tasks, monitor via status/recent/result, manage with cancel/reset/resume, and TUI-specific compact/raw operations. Minor gaps include no explicit listing of all companions for a cwd, but that's not essential.
Maintenance
Related MCP Connectors
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Coordinate coding agents through MCP using existing AI plans, saved work, and independent checks.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Remote MCP learning coach for coding agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables OpenAI Codex to consult Claude Code for co-analysis, adversarial second opinions, and read-only file review over the Model Context Protocol, with Claude remaining advisory and unable to modify files.924 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables Claude Code to delegate tasks to Codex for real-time collaborative code generation and execution.0MIT
- AlicenseAqualityAmaintenanceBridges Claude Code and OpenAI Codex through MCP, allowing cross-harness querying, code review, explanation, and implementation delegation.66 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex to delegate tasks to interactive Claude Code sessions as role-controlled subagents for exploration, code review, and implementation, using the existing Claude Code installation on macOS.MIT