Skip to content

Conversation

@harleylrn
Copy link
Contributor

@harleylrn harleylrn commented Nov 11, 2025

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:

  1. chat.delegateAutoApprove (boolean, default: false)

    • Global setting to auto-approve all delegate launches to specific agents
    • Still requires approval for default agent (which uses trust-all permissions)
  2. chat.delegateAutoApproveAgents (string, default: empty)

    • Comma-separated list of agent names to auto-approve
    • Provides fine-grained control for selective auto-approval
    • Example: "terraform-agent, github-pr-agent"

Changes

  • Settings: Added two new boolean/string settings in chat.delegateAutoApprove* namespace
  • Delegate Tool: Updated approval flow to consult settings before showing interactive prompt
  • Documentation: Updated docs/experiments.md to document new settings
  • Bug Fix: Fixed bug where user declining approval was silently ignored; now correctly aborts with error

Default Behavior

  • Unchanged - Auto-approve is disabled by default, preserving existing security posture
  • Users must explicitly opt-in via settings configuration
  • Default agent still requires approval (shows trust-all warning)

Configuration Examples

Enable global auto-approve (all agents except default)

q set chat.delegateAutoApprove true

Auto-approve specific agents

q set chat.delegateAutoApproveAgents "terraform-agent, github-pr-agent"

Via config file

Add to ~/.aws/amazonq/settings.json:

{
  "chat.delegateAutoApprove": true
}

or

{
  "chat.delegateAutoApproveAgents": "terraform-agent, github-pr-agent"
}

Testing

  • Tested approval flow with settings disabled (default) - still prompts user
  • Tested global auto-approve enabled - skips prompt
  • Tested per-agent list - skips prompt for listed agents, prompts for others
  • Tested user declining - correctly aborts delegation with error

References

Addresses user request for non-interactive delegate support to enable automation workflows without interactive approval prompts. Fixes: #3421

…interactive sessions

- Add chat.delegateAutoApprove setting for global auto-approval
- Add chat.delegateAutoApproveAgents setting for per-agent auto-approval
- Update delegate approval flow to consult settings before prompting
- Fix bug where user declining approval was silently ignored
- Document new settings in experiments.md

Fixes request for non-interactive delegate support in automation workflows.
@harleylrn harleylrn force-pushed the feat/delegate-auto-approve branch from db89231 to 56384af Compare November 11, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add approval configuration for the delegated agents.

1 participant