Feature request: background: true in custom command/skill frontmatter

Resolved 💬 3 comments Opened Mar 25, 2026 by abecutter Closed Apr 29, 2026

Use case

We have custom slash commands (skills) that are designed as fire-and-forget dispatchers — they should always run in the background and return control to the operator immediately. Example: /subfast dispatches work to a background agent.

Currently, the only way to achieve this is prompt-level instruction ("MUST dispatch to background agent"), which the model can and does override.

Current state

  • Subagent definitions (.claude/agents/) support background: true — this works for agents
  • Skill frontmatter supports context: fork and agent: — but neither controls foreground/background execution mode
  • There is no way to make a custom command mechanically run in the background

Requested feature

Add background: true as a supported frontmatter field for custom commands (.claude/commands/*.md):

---
description: Fire-and-forget task dispatcher
context: fork
background: true
---

When background: true is set, the command's execution should:

  1. Fork into a background context (not block the main conversation)
  2. Return control to the operator immediately
  3. Notify on completion (same as background Agent tool calls)

Why this matters

This enables architectural enforcement (technical constraint) rather than prompt trust (behavioral instruction) for dispatch-style commands. The model cannot override a runtime-enforced background mode, whereas it routinely overrides prompt instructions to "not execute inline."

Environment

  • Claude Code CLI on Windows (MSYS2/Git Bash)
  • Custom skills served via MCP server
  • Multi-agent constellation with operator-controlled dispatch

View original on GitHub ↗

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