Bug: Plugin agents require Edit in tools array for ANY tool to work

Resolved 💬 3 comments Opened Nov 26, 2025 by ErikEvenson Closed Jan 27, 2026

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

  1. Create a plugin agent with a tools array that does NOT include Edit:

``yaml
---
name: my-agent
tools: [Read, Write, Bash, Glob, Grep] # No Edit
---
``

  1. Invoke the agent via Task tool and ask it to use Bash to run date -u
  1. Expected: Agent uses Bash tool and returns real timestamp
  2. 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:

  1. No error messages are shown
  2. The response format looks correct
  3. 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.

View original on GitHub ↗

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