feat: Add configurable auto-approve for delegate tool to support non-interactive sessions #3423
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adds configurable auto-approve options for the delegate tool to enable non-interactive sessions without requiring manual approval for each task delegation.
Problem
The delegate tool currently requires explicit user approval (interactive 'Continue? [y/N]:' prompt) for every task delegation to specific agents. This blocks non-interactive sessions and automation workflows where approval prompts are not feasible.
Solution
Introduces two new settings to control delegate approval behavior:
chat.delegateAutoApprove(boolean, default: false)chat.delegateAutoApproveAgents(string, default: empty)"terraform-agent, github-pr-agent"Changes
chat.delegateAutoApprove*namespacedocs/experiments.mdto document new settingsDefault Behavior
Configuration Examples
Enable global auto-approve (all agents except default)
Auto-approve specific agents
Via config file
Add to
~/.aws/amazonq/settings.json:{ "chat.delegateAutoApprove": true }or
{ "chat.delegateAutoApproveAgents": "terraform-agent, github-pr-agent" }Testing
References
Addresses user request for non-interactive delegate support to enable automation workflows without interactive approval prompts. Fixes: #3421