Feature request: background: true in custom command/skill frontmatter
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/) supportbackground: true— this works for agents - Skill frontmatter supports
context: forkandagent:— 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:
- Fork into a background context (not block the main conversation)
- Return control to the operator immediately
- 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗