Custom slash commands that chain other slash commands drop remaining steps after the first nested invocation

Resolved 💬 5 comments Opened Apr 13, 2026 by wilburx3 Closed May 23, 2026

Summary

When a user-defined slash command instructs Claude to run multiple nested slash commands in sequence, Claude reliably stops after the first nested command completes and returns to the user instead of continuing with the remaining steps in the parent plan.

Reproduction

  1. Create ~/.claude/commands/end-session.md containing a chain of three sub-commands:

```md
# command: end-session

Run all three session wrap-up commands in sequence.

Steps:

  1. Execute /update-brain
  2. Execute /update-daily
  3. Execute /update-memory

@CLAUDE: Execute each command fully before moving to the next.
```

  1. Create three sibling commands in the same directory: update-brain.md, update-daily.md, update-memory.md. Each contains its own multi-step plan with file reads/edits.
  1. In a Claude Code session, run /end-session.

Expected

All three sub-commands run in sequence; all three resulting artifacts (brain file, daily note, memory entries) are present afterward.

Observed

/update-brain completes and produces its artifact. Claude then returns to the user with a summary of what it did, without invoking /update-daily or /update-memory. The user has to remind Claude to continue the chain for the second and third steps.

Confirmed four times on 2026-04-12 by a single user running the same /end-session command across different sessions, using claude-opus-4-6[1m]. Pattern is consistent, not intermittent.

Hypothesis

When Claude invokes a nested skill via the Skill tool, the sub-skill's prompt becomes the dominant instruction in context. After the sub-skill completes, Claude treats the parent command's remaining steps as already-satisfied because the sub-skill's own "execute this plan" instruction was the most recent one followed. The @CLAUDE: Execute each command fully before moving to the next instruction in the parent skill is a prompt nudge the harness does not enforce.

Suggested fixes

  1. Model-side (higher leverage, but slower to ship): train Claude to re-read parent slash-command plans for remaining steps after each nested Skill tool call returns, before addressing the user.
  1. Harness-side (faster): track a "parent command stack" — when a slash command invokes another via Skill, surface a system-reminder after the nested skill completes telling Claude "you are still inside /parent-command, remaining steps: …". This is analogous to the existing <system-reminder> reminders the harness already emits for plan mode, todos, etc.
  1. Documentation-side (workaround): document that user-defined slash commands should not assume chain continuation; tell users to either inline the work or explicitly instruct Claude to re-check the parent plan after each sub-invocation.

Workaround

I've edited my local end-session.md to include an explicit reminder block and step 3 that verifies all three artifacts landed before returning to the user. That cut the failure rate for me personally, but I can tell it's still a model-discipline problem — the instruction has to be repeated in every chain-parent command rather than being a harness guarantee.

Environment

  • Claude Code CLI, latest
  • Model: claude-opus-4-6[1m] (Opus 4.6, 1M context)
  • OS: macOS (darwin 25.4.0)

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗