[FEATURE] Expand slash commands in SendMessage the way a typed prompt does

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 7, 2026

Problem Statement

I run one Claude Code session as a coordinator, and it hands work to other sessions with SendMessage. A slash command inside that message arrives as plain text. So a skill with disable-model-invocation: true can start a session (as the opening of a claude --bg prompt), but it can never be sent to one that is already running.

In practice my coordinator can't tell a running coder "/to-tickets .scratch/cli" once the coder has finished its first job. Today the receiver reads the skill's SKILL.md and follows it by hand. That works, but the skill becomes plain context, and the user-only flag stops meaning much.

Proposed Solution

When a SendMessage body starts with a slash command, the receiving session expands it exactly as if the user had typed that message, args included, with the same permission checks.

If that's too wide for user-only skills, an opt-in would do: a frontmatter key or a setting that lets a peer session's message invoke the skill.

Alternative Solutions

  • Have the receiver read SKILL.md (what we do now).
  • Spawn a fresh session per command, losing the context the first one built.
  • Type into the session's terminal through tmux. Terminal sessions only, and fragile.

Related: #99049 (a CLI to message a running session without a model turn).

Priority: Medium. Category: Other. Labels I'd pick: enhancement, area:agents, area:skills.

— printed by Claude Code, signed by me.

View original on GitHub ↗