Bug: Plugin agents require Edit in tools array for ANY tool to work
Bug Description
Plugin agents defined without Edit in their tools: array cannot invoke ANY tools - they fabricate all responses instead.
Environment
- Claude Code Version: Latest (as of 2025-11-25)
- OS: macOS Darwin 24.6.0
- Shell: zsh
Steps to Reproduce
-
Create a plugin agent with a tools array that does NOT include
Edit:--- name: my-agent tools: [Read, Write, Bash, Glob, Grep] # No Edit --- -
Invoke the agent via Task tool and ask it to use Bash to run
date -u -
Expected: Agent uses Bash tool and returns real timestamp
-
Actual: Agent fabricates a response without invoking any tools (e.g., returns timestamp from ~1 year ago)
Root Cause Analysis
We tested 10+ plugin agents systematically:
| Agent | Has Edit in tools[] | Tool Invocation |
|---|---|---|
| spec-implementer | Yes | ✓ Works |
| clause-analyzer | Yes | ✓ Works |
| risk-assessor | Yes | ✓ Works |
| specification-critic | No | ✗ Fabricates |
| aws-introspector | No | ✗ Fabricates |
| phase0-investigator | No | ✗ Fabricates |
100% correlation: Agents WITH Edit in tools array can invoke all their tools. Agents WITHOUT Edit cannot invoke ANY tools.
Workaround
Add Edit to the tools array even if the agent doesn't need to edit files:
tools: [Read, Write, Edit, Bash, Glob, Grep] # Edit required for tools to work
Evidence
After adding Edit to the tools array and starting a fresh session:
-
Before fix (no Edit): Agent returned fabricated timestamp
2024-11-25T...(1 year old) -
After fix (with Edit): Agent returned real timestamp
2025-11-26T01:42:39Z
Impact
This bug causes plugin agents to appear functional but return completely fabricated data. It's particularly insidious because:
- No error messages are shown
- The response format looks correct
- Only careful inspection reveals the data is fake
Expected Behavior
Plugin agents should be able to invoke the tools listed in their tools: array regardless of whether Edit is present.