aws / aws/amazon-q-developer-cli

Delegate command uses q_cli_default by default instead of chat.defaultAgent setting

Open
#3,174 0 comments 0 reactions 0 assignees View on GitHub
bug custom-agent q chat
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

macOS 15.6.1 (24G90)

### Expected behaviour

When I use the new (experimental) delegate command without an agent name specified, it uses the `q_cli_default` instead of `chat.defaultAgent` or current agent.

It's possible this was an intentional design choice, but it's unintuitive. I see in the codebase that the DEFAULT_AGENT_NAME is used quite a bit, instead of relying on the `chat.defaultAgent`, but this is the only place I've been affected by it.

### Actual behaviour

I'd expect the default value for the agent to be executed to be the current agent or the one sourced from the `chat.defaultAgent` setting, instead of the hard-coded `q_cli_default`.

### Steps to reproduce

Bash:
```sh
q settings chat.defaultAgent agent-a
q chat --agent agent-b
/experiment (to enable delegate)
Delegate the question "what time is it?"
```

The delegate tool uses the hard-coded `q_cli_default` agent instead of `agent-a` or `agent-b`, either of which would be more intuitive.

### Environment

```yaml

[q-details]
version = "1.18.1"
hash = "5610605baef17b76ef41448f2e943f021c2b2273"
date = "2025-10-13T22:31:07.064465Z (2d ago)"

[system-info]
os = "macOS 15.6.1 (24G90)"
chip = "Apple M2 Pro"
total-cores = 12
memory = "32.00 GB"

[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
install-method = "unknown"

[env-vars]
PATH = "/Users/USER/.local/bin:/Users/USER/bin:/Users/USER/.toolbox/bin:/Users/USER/.jenv/shims:/Users/USER/.jenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/USER/.local/bin:/Users/USER/Library/Application Support/JetBrains/Toolbox/scripts:/Users/USER/.cache/lm-studio/bin"
Q_SET_PARENT_CHECK = "1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "dev.warp.Warp-Stable"
```

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.