claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Slash command with arguments ignored - arguments treated as regular prompt

Open cloud-on-prem opened this issue 3 weeks ago • 0 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When invoking a custom slash command with arguments (e.g., /requirements ), Claude Code ignores the slash command entirely and treats the arguments as a regular user prompt.

However, if I run the same command without arguments (/requirements), it correctly prompts me for the requirements and then executes the command as expected.

What Should Happen?

The slash command should execute with the provided arguments passed to $ARGUMENTS or positional parameters ($1, $2, etc.).

Error Messages/Logs


Steps to Reproduce

  1. Create a custom slash command that accepts arguments (e.g., /requirements)
  2. Run the command with arguments: /requirements build a login page with OAuth support
  3. Observed: Claude responds to "build a login page with OAuth support" as if it were a regular prompt - the /requirements command never executes
  4. Run the same command without arguments: /requirements
  5. Observed: Command executes correctly and prompts for input

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.7

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This is distinct from #6570 and #14304 where the command executes but arguments are lost. In this case, the command itself never executes - the entire /command prefix is ignored and only the argument text is processed as user input.

cloud-on-prem avatar Jan 16 '26 00:01 cloud-on-prem