[BUG] Prompts coming from MCPs are ignored
Environment
- Platform (select one):
- [X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.44 (Claude Code)
- Operating System: MacOS 15.3.1
- Terminal: Warp
Bug Description
I've created a very simple MCP that returns an hello-world prompt. The MCP is correctly added to Claude Code, which sees prompts and show them as commands.
However, once commands are invoked, claude code treats them as text, without (apparently) invoking the proper mcp tool. It sometimes also tries to run the command itself in another claude instance with bash tool.
When you made it notice, it correctly runs the prompt. The same happens if you type the following before running the prompt
My next message will be a command that retrieve a prompt from an mcp. Please retrieve the prompt and execute it here (and e.g., not running a claude code instance with bash)
It looks like running prompts coming from mcp is not the first choice the agent takes
Expected Behavior
The prompt coming from the mcp is immediately run
Actual Behavior
You need to nudge the agent to run the prompt
Additional Context
This used to run up until this morning. I've changed nothing on my side but this start to appear
<img width="1271" height="275" alt="Image" src="https://github.com/user-attachments/assets/a51d06a5-d1bf-4570-9ac9-9302fba8af83" />
<img width="1701" height="624" alt="Image" src="https://github.com/user-attachments/assets/d051c47b-ccbc-4b46-b3b8-581dc7f72fca" />
<img width="1627" height="305" alt="Image" src="https://github.com/user-attachments/assets/da43b24e-b4b1-460a-9d25-5e40886ec4ee" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗