cmux-diagnostics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cmux Diagnostics

cmux 诊断

Use this skill to collect and interpret support-safe cmux diagnostics for end users. Default to read-only checks. Do not dump hook config files, session stores, prompt logs, tokens, or environment secrets.
使用此skill为终端用户收集并解读支持安全的cmux诊断信息。默认执行只读检查。请勿导出钩子配置文件、会话存储、提示日志、令牌或环境密钥。

Quick Report

快速报告

Run the bundled read-only diagnostic script first:
bash
undefined
首先运行捆绑的只读诊断脚本:
bash
undefined

From a cmux checkout

From a cmux checkout

skills/cmux-diagnostics/scripts/cmux-diagnostics
skills/cmux-diagnostics/scripts/cmux-diagnostics

From an installed skill

From an installed skill

~/.agents/skills/cmux-diagnostics/scripts/cmux-diagnostics
~/.agents/skills/cmux-diagnostics/scripts/cmux-diagnostics

From a Codex-only skills.sh install

From a Codex-only skills.sh install

~/.codex/skills/cmux-diagnostics/scripts/cmux-diagnostics

Use `--include-context` only when workspace names, cwd paths, and current cmux identifiers are relevant to the user-reported issue:

```bash
skills/cmux-diagnostics/scripts/cmux-diagnostics --include-context
~/.codex/skills/cmux-diagnostics/scripts/cmux-diagnostics

仅当工作区名称、当前工作目录路径和当前cmux标识符与用户报告的问题相关时,才使用`--include-context`参数:

```bash
skills/cmux-diagnostics/scripts/cmux-diagnostics --include-context

What to Check

检查项

  1. CLI and socket health:
    bash
    command -v cmux
    cmux ping
    cmux capabilities --json
    If socket commands fail, check whether the agent is running inside a cmux terminal and whether socket automation is enabled.
  2. Settings health:
    bash
    ~/.agents/skills/cmux-settings/scripts/cmux-settings validate
    ~/.agents/skills/cmux-settings/scripts/cmux-settings get terminal.autoResumeAgentSessions
    If the user installed with
    skills.sh
    , use
    ~/.codex/skills/cmux-settings/scripts/cmux-settings
    instead. If
    terminal.autoResumeAgentSessions
    is false, cmux restores panes but will not automatically resume saved agent sessions.
  3. Hook installation:
    bash
    cmux hooks setup --agent codex
    cmux hooks setup --agent opencode
    cmux hooks setup
    Only run install or uninstall commands after the user agrees.
    cmux hooks setup
    installs supported agents found on PATH and skips missing agents.
  4. Session restore evidence:
    bash
    ls -lh ~/.cmuxterm/*-hook-sessions.json 2>/dev/null
    Missing session stores usually means the agent has not run inside cmux since hooks were installed, hooks are disabled, or the agent integration does not support resume capture.
  5. Notification path:
    bash
    cmux notify "cmux diagnostic test"
    Use this only when the user is ready for a visible test notification.
  1. CLI与套接字健康状况:
    bash
    command -v cmux
    cmux ping
    cmux capabilities --json
    如果套接字命令执行失败,请检查Agent是否在cmux终端内运行,以及套接字自动化是否已启用。
  2. 设置健康状况:
    bash
    ~/.agents/skills/cmux-settings/scripts/cmux-settings validate
    ~/.agents/skills/cmux-settings/scripts/cmux-settings get terminal.autoResumeAgentSessions
    如果用户通过
    skills.sh
    安装,请改用
    ~/.codex/skills/cmux-settings/scripts/cmux-settings
    。 如果
    terminal.autoResumeAgentSessions
    为false,cmux会恢复面板,但不会自动恢复已保存的Agent会话。
  3. 钩子安装情况:
    bash
    cmux hooks setup --agent codex
    cmux hooks setup --agent opencode
    cmux hooks setup
    仅在用户同意后再运行安装或卸载命令。
    cmux hooks setup
    会安装PATH中找到的受支持Agent,并跳过缺失的Agent。
  4. 会话恢复证据:
    bash
    ls -lh ~/.cmuxterm/*-hook-sessions.json 2>/dev/null
    缺少会话存储通常意味着自钩子安装后,Agent未在cmux内运行、钩子已禁用,或者Agent集成不支持恢复捕获。
  5. 通知路径:
    bash
    cmux notify "cmux diagnostic test"
    仅当用户准备好接收可见的测试通知时才使用此命令。

Interpretation

解读

  • cmux
    not found: the CLI is not installed or not on PATH for this shell.
  • cmux ping
    fails: app is not reachable through the current socket path, the app is closed, or automation access is disabled.
  • No
    CMUX_WORKSPACE_ID
    or
    CMUX_SURFACE_ID
    : the command is probably running outside a cmux terminal. Some hooks intentionally no-op outside cmux.
  • Hook config exists but no session store: run one supported agent inside cmux after installing hooks, then re-check.
  • Session store exists but restore does not launch agents: check
    terminal.autoResumeAgentSessions
    and whether the saved executable still exists on PATH.
  • Settings validation fails: fix the config first. Invalid config can make later symptoms misleading.
  • cmux
    未找到:CLI未安装,或未在此shell的PATH中。
  • cmux ping
    失败:应用无法通过当前套接字路径访问、应用已关闭,或自动化访问已禁用。
  • CMUX_WORKSPACE_ID
    CMUX_SURFACE_ID
    :命令可能在cmux终端外运行。部分钩子在cmux外会故意不执行任何操作。
  • 钩子配置存在但无会话存储:安装钩子后,在cmux内运行一个受支持的Agent,然后重新检查。
  • 会话存储存在但恢复未启动Agent:检查
    terminal.autoResumeAgentSessions
    设置,以及保存的可执行文件是否仍存在于PATH中。
  • 设置验证失败:先修复配置。无效配置会导致后续症状产生误导。

Rules

规则

  • Stay read-only until the user asks to fix something.
  • Never print raw hook files, session JSON, prompt logs, shell history, tokens, or API keys.
  • Summarize file presence, size, modified time, and marker presence instead of contents.
  • Prefer narrow fixes such as
    cmux hooks setup --agent codex
    over reinstalling every integration.
  • After a fix, rerun the diagnostic script and report the changed lines.
  • 在用户要求修复问题前,保持只读状态。
  • 切勿打印原始钩子文件、会话JSON、提示日志、shell历史记录、令牌或API密钥。
  • 总结文件的存在性、大小、修改时间和标记存在情况,而非内容。
  • 优先选择针对性修复,例如
    cmux hooks setup --agent codex
    ,而非重新安装所有集成。
  • 修复后,重新运行诊断脚本并报告更改的行。