[Bug] Slash Commands Fail to Execute Properly
Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Sep 26, 2025 · closed Jan 9, 2026
Bug Description
slash commands aren't working!
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 1.0.127
- Feedback ID: 58fdbcd2-c179-4ab7-82df-1027ba7afcd6
Errors
[{"error":"SyntaxError: Unexpected token 'H', \"Here's a d\"... is not valid JSON\n at JSON.parse (<anonymous>)\n at file:///Users/k/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:746:9932\n at Q (file:///Users/k/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:713:13287)\n at hT2 (file:///Users/k/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1670:1769)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-26T18:39:56.198Z"}]
11 Comments
---
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
---
@khromov What is the output of
claude --version? Do you have more specific steps to reproduce, like which slash command?@trav The version is
1.0.127. It's very simple to reproduce:claude mcp add --transport http --scope project svelte-llm https://svelte-llm.stanislav.garden/mcp/mcpclaude/svelte-llmand tab to fill in any of the suggested resourcesUnknown slash command: svelte-llm:Sveltealmost like it can't handle spaces correctly, the name of the command gets cut offThis has worked before and broke maybe 1-2 months ago.
Had the same problem - custom commands AND agents not showing up in /help even though search was working.
Found the culprit was my ripgrep config. I had --color=always in my ~/.ripgreprc which was embedding ANSI color codes in file paths during Claude Code's
discovery process. It was trying to read files like [0m[1m[32m/path/to/command.md[0m instead of the actual path.
Fixed it by changing --color=always to --color=auto in my ripgrep config. Still get colors in terminal but Claude Code gets clean paths for file
discovery.
Worth checking if you have custom ripgrep settings - might be the same issue.
@mg-dev25 Do the repro instructions I posted work correctly for you?
The only thing I'm using is Oh My Zsh, but even starting a new terminal from
shand launchingclaudedoes not solve the issue.@khromov Do you have ripgrep install on your system, Claude code are using it if he found it and this cause a lot of issue.
Did the issue happen only in VSCode ? What if you run Claude code in a normal terminal ?
Can you run
claude --debugto see what if he found a particular issues?I do not have ripgrep/rg installed:
The error happens on both mac terminal and vscode terminal.
Running with
--debugflag and reading/Users/k/Library/Logs/claude-cli-nodejs/-Users-k/debug-logs/debug.txtdoes show some ripgrep stuff, but it seems that it ultimately fails and doesn't use it? Also I cant' see the actual original error (which seemed to be a JSON parsing issue:SyntaxError: Unexpected token 'H', \"Here's a d\"... is not valid JSON). So I am not convinced this has to do with ripgrep but rather that Claude seems to mess up the JSON encoding.Claude code as built in ripgrep in its code. For me, I change the ENV to use the one on my system and use my ripgrep config not the build in config inside claude code. You can test installing it in your system and create a config file at the home dir to force color in auto. If rg fail he will not find your commands and agents
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.