[BUG] Subagent with declared Bash tool should not ask user for permission

Resolved 💬 4 comments Opened Mar 28, 2026 by YunosukeY Closed May 2, 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?

The subagent has tools: Bash declared in its definition, but when it attempts to execute a shell script, it still asks the user for permission instead of running autonomously. The tools declaration should implicitly grant the subagent permission to use those tools without user confirmation.

What Should Happen?

The subagent should execute the shell script without asking the user for permission, since tools: Bash is explicitly declared in its definition.

Error Messages/Logs

Steps to Reproduce

Directory structure:

.claude/
├── agents/
│   └── test.md
└── scripts/
    └── test.sh

.claude/agents/test.md:

---
name: test
description: test
tools: Bash
---

Execute ~/work/tmp/cc-agent-test/.claude/scripts/test.sh

.claude/scripts/test.sh:

echo "Hello World!"

Steps:

  1. Set up the above directory structure and files
  2. Start a Claude Code session in the project directory
  3. Prompt Claude: @"test (agent)"
  4. The subagent attempts to execute test.sh via Bash

Result: The subagent asks the user for permission before executing the shell script instead of running it autonomously.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.86 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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