Add exit notifications for slash command agents

Resolved 💬 3 comments Opened Nov 9, 2025 by kaytechinc Closed Jan 12, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When a slash command agent (like /marketing-agent) completes its task and returns control to the main Claude Code agent, there is no clear notification to the user. This creates confusion about which agent is currently handling requests. Users must explicitly ask "Am I still in [command]?" to verify their current context.

Proposed Solution

Add a clear, visible notification when a slash command agent exits and returns control to the main session. The notification should appear in the conversation and clearly indicate:

  • Which agent/command has completed
  • That control has returned to the main Claude Code agent

Example notification:
✓ /cold-email agent completed. Returned to main Claude Code session.

Alternative Solutions

  1. Status line indicator: Show the current active agent in the Claude Code status line (e.g., "Agent: cold-email" vs "Agent: main")
  2. Prompt prefix: Add a visual prefix to responses indicating which agent is responding (e.g., "[cold-email]" or "[main]")
  3. Explicit exit command: Require users to manually exit slash commands with a command like /exit or /done, preventing silent transitions
  4. Session persistence: Keep slash command agents active for the entire session unless explicitly exited, rather than auto-exiting after task completion

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Scenario: User is working on a cold email campaign optimization project.

  1. User invokes /cold-email to get help with email sequences
  2. Agent helps optimize Steps 1-6, fix language issues, and rename files
  3. Agent silently exits after completing the task
  4. User asks follow-up question: "Should I update the subject lines?"
  5. Problem: User expects cold-email agent to respond with specialized expertise, but main agent responds instead with generic advice
  6. User asks: "Am I still in /cold-email?" to verify context
  7. User must re-invoke /cold-email to continue with specialized agent

Additional Context

  • This issue affects all custom slash commands, not just /cold-email
  • Silent transitions between agents can lead to:
  • Confusion about why responses lack expected specialized knowledge
  • Wasted prompts asking context-verification questions
  • Need to re-explain context when re-invoking the agent
  • Similar tools (like tmux, screen, virtual environments) show clear indicators of current context/session

View original on GitHub ↗

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