Allow slash commands to declare required arguments and prevent auto-execution until provided
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
Description:
When a slash command is selected from the / picker, it executes immediately even if the command requires arguments. There is currently no way for a command definition to declare that it requires input before running.
Steps to reproduce:
- Type / in the chat input
- See command suggestions appear
- Click a custom command that requires arguments (e.g. /jira-desc)
- Command executes immediately with empty $ARGUMENTS
Proposed Solution
Expected behavior:
If a command declares required arguments, the picker should either:
Keep the cursor in the input field after inserting the command name, so the user can type arguments before submitting
Show an inline placeholder (e.g. /jira-desc <describe your requirement>) that guides the user to fill in the argument before execution
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Custom project commands in .claude/commands/ are increasingly used for structured workflows (ticket generation, PR review, deploy helpers). Most of these are meaningless without arguments. Accidental empty execution creates noise and confuses new team members who discover commands via the picker.
Suggested implementation:
Add an optional args field in command file formatter:
---
args: required # or "optional"
args_hint: "describe your feature or bug"
---
When args: required, the picker inserts the command name but keeps focus in the input for the user to complete it before submitting.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗