aws / aws/amazon-q-developer-cli

Feature Request: Enable automatic tool trust for delegated agents

Open
#3,432 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Problem
The `delegate` tool launches sub-agents with `--no-interactive` but not `--trust-all-tools`, causing tool approval failures when sub-agents try to use MCP tools.

**Error message:**

Tool approval required but --no-interactive was specified. Use --trust-all-tools to automatically approve tools.

This makes delegation unusable for agents that need MCP tools.

## Steps to Reproduce
1. Launch parent agent: `q chat --agent parent-agent --trust-all-tools`
2. Delegate task to sub-agent with MCP tools configured:
bash
delegate launch --agent research-agent --task "Research using MCP tools"

3. Sub-agent fails when attempting to use any MCP tool due to approval requirement

## Expected Behavior
When a parent agent is launched with
--trust-all-tools
, delegated sub-agents should inherit this trust setting automatically.

**Proposed solution:** Add configuration option in agent JSON:

json
{
"name": "research-agent",
"allowedTools": ["*"],
"delegateSettings": {
"trustAllTools": true
}
}

Or automatically inherit `--trust-all-tools` from parent agent.

## Current Workaround
Run sub-agents manually in separate terminal: `q chat --agent research-agent --trust-all-tools`

## Impact
- Breaks multi-agent workflows that rely on MCP tools
- Forces manual intervention for research/analysis agents
- Limits usefulness of delegate feature for complex tasks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.