aws / aws/amazon-q-developer-cli
bug: running an agent with --trust-all-tools and --no-interactive fails unless the agent def also has the corresponding allowedTools set
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
Ubuntu Linux
### Expected behaviour
If i run any cli session, interactive or not, specific agent or not, --trust-all-tools should do just that.
I'm not sure if this is the desired behavior, if so, then perhaps the documentation should just clarify this a bit. But for example, to me at least, even if say my agent def allowed only a subset of configured tools (or none at all) that setting should override it. --trust-all-tools (with an appropriate startup warning, etc), set should negate the need to respond to any permissions prompts
### Actual behaviour
CLI non-interactive + trust-all-tools runs hang when permissions are required.
### Steps to reproduce
1. create a simple agent, ensure that 'allowedTools' is NOT set
2. run the cli specifying the agent, --no-interactive --trust-all-tools, and your prompt
THe agent execution hangs when permissions are required. Also, note that you don't see the issue until you notice its hanging and ctrl-C. _then_ you'll see the permissions message, ironically with a note to set --trust-all-tools
### Environment
```yaml
Omitted as this happens on all platforms
```
Contributor guide
Assessment
This issue has not been assessed yet.