OpenParable
Skip to content
← Back to skills

Wmux Detect

Agent Building
wmux-detect

Wmux Detect is an Agent Skill for agent building published in the amirlehmam/wmux repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Detect if wmux terminal multiplexer is running. Used internally by orchestrate skill to decide between wmux multi-pane mode and degraded subagent mode.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/amirlehmam/wmux/blob/HEAD/resources/wmux-orchestrator/skills/wmux-detect/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/wmux-detect, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

wmux Detection

First, resolve the plugin root (not available as env var in main session):

PLUGIN_ROOT=$(find "$HOME/.claude/plugins/cache/wmux-orchestrator" -name "plugin.json" -path "*/.claude-plugin/*" 2>/dev/null | sort -V | tail -1 | sed 's|/.claude-plugin/plugin.json||')

Run the detection script to check if wmux is available:

bash "$PLUGIN_ROOT/scripts/detect-wmux.sh"

If output is "available":

  • wmux is running and the named pipe is accessible
  • The orchestrator can use wmux split, wmux agent spawn, wmux markdown set etc.
  • Full multi-pane visual experience is available

Detection works even when wmux isn't on PATH: shells spawned by wmux always carry $WMUX_CLI (the path to the CLI script), and the detection script falls back to running it via node when the bare command isn't found. The same fallback applies to every plugin script that calls wmux.

If output is "unavailable":

  • wmux is not running or not installed
  • Fall back to Claude Code's native Agent tool for parallel workers
  • No visual dashboard — use text summaries in the terminal instead
  • Log: "wmux not detected. Running in degraded mode — agents will use Claude Code's native subagent system. Install wmux for the full multi-pane experience: https://wmux.org"

Store the detection result so other skills can check it without re-running:

export WMUX_AVAILABLE=$( bash "$PLUGIN_ROOT/scripts/detect-wmux.sh" 2>/dev/null && echo "true" || echo "false" )

ENFORCEMENT:

  • When WMUX_AVAILABLE=true: ALL agents MUST be spawned via wmux agent spawn. Do NOT use Claude Code's Agent tool. The Agent tool creates invisible subagents — the user chose wmux specifically to SEE agents in panes.
  • When WMUX_AVAILABLE=false: Use Claude Code's Agent tool with subagent_type: "wmux-orchestrator:wmux-worker".
  • Never mix modes within an orchestration.