Document Location
This document lives in github.com/vtmocanu/skills at cmux-diagnostics/SKILL.md.
Note: This is the source of truth. Generated copies in your agent's skills directory (e.g. Claude Code's ~/.claude/commands/) are derived from this file via dot-ai skills generate --repo https://github.com/vtmocanu/skills. Edit here and regenerate; never edit generated copies. Upstream source: manaflow-ai/cmux (skills/cmux-diagnostics/); re-sync from upstream rather than authoring from scratch.
cmux Diagnostics
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.
Quick Report
Run the bundled read-only diagnostic script first:
# Bundled with this skill (the dot-ai generator rewrites ./scripts to the absolute install path)
./scripts/cmux-diagnostics
Use --include-context only when workspace names, cwd paths, and current cmux identifiers are relevant to the user-reported issue:
./scripts/cmux-diagnostics --include-context
What to Check
CLI and socket health:
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.
Settings health (invokes the sibling cmux-settings skill's bundled helper — its install location depends on the host: ~/.claude/commands/dot-ai-cmux-settings/scripts/cmux-settings under dot-ai/Claude Code, ~/.agents/skills/cmux-settings/scripts/cmux-settings under the upstream cmux installer, ~/.codex/skills/cmux-settings/scripts/cmux-settings under skills.sh):
CMUX_SETTINGS_HELPER="$(command -v cmux-settings 2>/dev/null \
|| { for p in \
"$HOME/.claude/commands/dot-ai-cmux-settings/scripts/cmux-settings" \
"$HOME/.agents/skills/cmux-settings/scripts/cmux-settings" \
"$HOME/.codex/skills/cmux-settings/scripts/cmux-settings"; do
[ -x "$p" ] && { printf '%s' "$p"; break; }
done; })"
"$CMUX_SETTINGS_HELPER" validate
"$CMUX_SETTINGS_HELPER" get terminal.autoResumeAgentSessions
If terminal.autoResumeAgentSessions is false, cmux restores panes but will not automatically resume saved agent sessions.
Hook installation:
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.
Session restore evidence:
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.
Notification path:
cmux notify "cmux diagnostic test"
Use this only when the user is ready for a visible test notification.
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.
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.
1---2name: cmux-diagnostics3description: Run end-user cmux diagnostics. Use when cmux hooks, notifications, session restore, settings, browser automation, socket access, CLI control, or agent resume behavior is not working, or when the user asks for a cmux health check, doctor report, or support-safe debug summary.4---56## Document Location7This document lives in [github.com/vtmocanu/skills](https://github.com/vtmocanu/skills) at `cmux-diagnostics/SKILL.md`.89> **Note**: This is the source of truth. Generated copies in your agent's skills directory (e.g. Claude Code's `~/.claude/commands/`) are derived from this file via `dot-ai skills generate --repo https://github.com/vtmocanu/skills`. Edit here and regenerate; never edit generated copies. Upstream source: `manaflow-ai/cmux` (skills/cmux-diagnostics/); re-sync from upstream rather than authoring from scratch.1011# cmux Diagnostics1213Use 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.1415## Quick Report1617Run the bundled read-only diagnostic script first:1819```bash20# Bundled with this skill (the dot-ai generator rewrites ./scripts to the absolute install path)21./scripts/cmux-diagnostics22```2324Use `--include-context` only when workspace names, cwd paths, and current cmux identifiers are relevant to the user-reported issue:2526```bash27./scripts/cmux-diagnostics --include-context28```2930## What to Check31321. CLI and socket health:3334 ```bash35 command -v cmux36 cmux ping37 cmux capabilities --json38 ```3940 If socket commands fail, check whether the agent is running inside a cmux terminal and whether socket automation is enabled.41422. Settings health (invokes the sibling `cmux-settings` skill's bundled helper — its install location depends on the host: `~/.claude/commands/dot-ai-cmux-settings/scripts/cmux-settings` under dot-ai/Claude Code, `~/.agents/skills/cmux-settings/scripts/cmux-settings` under the upstream cmux installer, `~/.codex/skills/cmux-settings/scripts/cmux-settings` under `skills.sh`):4344 ```bash45 CMUX_SETTINGS_HELPER="$(command -v cmux-settings 2>/dev/null \46 || { for p in \47 "$HOME/.claude/commands/dot-ai-cmux-settings/scripts/cmux-settings" \48 "$HOME/.agents/skills/cmux-settings/scripts/cmux-settings" \49 "$HOME/.codex/skills/cmux-settings/scripts/cmux-settings"; do50 [ -x "$p" ] && { printf '%s' "$p"; break; }51 done; })"52 "$CMUX_SETTINGS_HELPER" validate53 "$CMUX_SETTINGS_HELPER" get terminal.autoResumeAgentSessions54 ```55 If `terminal.autoResumeAgentSessions` is false, cmux restores panes but will not automatically resume saved agent sessions.56573. Hook installation:5859 ```bash60 cmux hooks setup --agent codex61 cmux hooks setup --agent opencode62 cmux hooks setup63 ```6465 Only run install or uninstall commands after the user agrees. `cmux hooks setup` installs supported agents found on PATH and skips missing agents.66674. Session restore evidence:6869 ```bash70 ls -lh ~/.cmuxterm/*-hook-sessions.json 2>/dev/null71 ```7273 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.74755. Notification path:7677 ```bash78 cmux notify "cmux diagnostic test"79 ```8081 Use this only when the user is ready for a visible test notification.8283## Interpretation8485- `cmux` not found: the CLI is not installed or not on PATH for this shell.86- `cmux ping` fails: app is not reachable through the current socket path, the app is closed, or automation access is disabled.87- No `CMUX_WORKSPACE_ID` or `CMUX_SURFACE_ID`: the command is probably running outside a cmux terminal. Some hooks intentionally no-op outside cmux.88- Hook config exists but no session store: run one supported agent inside cmux after installing hooks, then re-check.89- Session store exists but restore does not launch agents: check `terminal.autoResumeAgentSessions` and whether the saved executable still exists on PATH.90- Settings validation fails: fix the config first. Invalid config can make later symptoms misleading.9192## Rules9394- Stay read-only until the user asks to fix something.95- Never print raw hook files, session JSON, prompt logs, shell history, tokens, or API keys.96- Summarize file presence, size, modified time, and marker presence instead of contents.97- Prefer narrow fixes such as `cmux hooks setup --agent codex` over reinstalling every integration.98- After a fix, rerun the diagnostic script and report the changed lines.