[BUG] Positional parameters don't work anymore in slash commands

Resolved 💬 5 comments Opened Jan 12, 2026 by elifarley Closed Feb 27, 2026

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?

Create a user slash command that uses positional parameters inside a block, like:

!`echo $1`

Positional parameters are never replaced as expected, even though "$ARGUMENTS" is working fine.

See https://github.com/anthropics/claude-code/issues/8758#issuecomment-3738726406

What Should Happen?

For my example below, I'd expect to see a response like this:

● Using the t1 skill to write verbatim as requested.

  Password 1: 'XXX'
  Password 1: 'XXX'
  Second password is 'YYY'
  Second password is 'YYY'
  Group password is 'XXX YYY' ?
  Group password is 'XXX YYY' ?

Error Messages/Logs

Steps to Reproduce

  1. Create a user slash command named t1.md like this:
---
argument-hint: [first] [second]
description: Write as requested, verbatim.
---

1. Write verbatim twice: "!`echo "Password 1: '$1'"`";
2. Write verbatim twice: "!`echo "Second password is '$2'"`";
3. Write verbatim twice: "!`echo "Group password is '$ARGUMENTS' ?"`";
  1. Start Claude Code, then run /t1 XXX YYY. The result I got was:
● Using the t1 skill to write verbatim as requested.

  Password 1: ''
  Password 1: ''
  Second password is ''
  Second password is ''
  Group password is 'XXX YYY' ?
  Group password is 'XXX YYY' ?

We can conclude the positional parameter substitution doesn't work anymore, even though "$ARGUMENTS" works just fine.

See https://github.com/anthropics/claude-code/issues/8758#issuecomment-3738726406

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.5

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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