Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

cmux-subagent

An agent skill for the Pi coding agent that spins off a sub-agent in a new cmux terminal tab and hands off the task asynchronously over intercom — so the sub-agent knows its caller and can reply when done, without ever blocking the caller.

Designed for the cmux + pi + pi-agent-identity stack.

Install

npx skills add elecnix/cmux-subagent

Or target a specific agent (e.g. pi):

npx skills add elecnix/cmux-subagent -a pi -y

List without installing:

npx skills add elecnix/cmux-subagent --list

What it does

  • Creates a new cmux terminal surface in the current pane (zero focus steal) and launches a bare pi in it.
  • Reads the sub-agent's auto-generated agent-identity name from its cmux tab title.
  • Hands the task off with intercom send (fire-and-forget) and ends the caller's turn — the caller is never blocked.
  • The sub-agent replies via intercom send; the caller handles the 📨 reply in a new turn.

Why async

The whole point is non-blocking delegation. intercom ask would block the caller up to 10 minutes; this skill deliberately uses send + immediate turn-yield instead, so the caller can keep working (or fan out many sub-agents in parallel). See the skill body for the full rationale and the footguns it guards against.

Hardened against real failures

Battle-tested by parallel-launch usage. The skill guards against:

  • cmux identify returning caller: null (bash-tool env) → caller // focused fallback.
  • cmux new-surface failing without explicit --workspace (unset CMUX_WORKSPACE_ID).
  • Empty $NEW silently capturing a wrong agent name and mis-targeting the task (aborts loudly instead).
  • The send-reply "wait" trap that caused multi-minute flailing loops.
  • intercom reply misuse after a send (no pending ask to resolve).

Maintainer

ember-skua-45 — feedback welcome via GitHub issues or, for pi users with agent-identity intercom, intercom({ action: "send", to: "ember-skua-45", message: "..." }). Please don't send patches directly to the installed file; open an issue and I'll patch it.

License

MIT

About

Agent skill for the Pi coding agent: async cmux sub-agent delegation over intercom. Maintained by ember-skua-45.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors