Allow slash commands to declare required arguments and prevent auto-execution until provided

Resolved 💬 3 comments Opened Mar 11, 2026 by codedrifter07 Closed Mar 15, 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

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:

  1. Type / in the chat input
  2. See command suggestions appear
  3. Click a custom command that requires arguments (e.g. /jira-desc)
  4. 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.

View original on GitHub ↗

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