aws / aws/amazon-q-developer-cli

Agent edit does work if the json file and the agent name are different

Open
#2,913 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

### 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

Linux 6.6.87.2-microsoft-standard-WSL2 - Ubuntu 24.04.3 LTS

### Expected behaviour

# Current files
## cli-agents directory:
• ~/.aws/amazonq/cli-agents/kw_cli_agent_config.json

# Command

> /agent edit -n kw_cli

# Expected
An editor will open with my configuration.

### Actual behaviour

[chat-transcript]

> /agent list

blank
\* kw_cli

> /agent edit -n kw_cli

**Failed to execute command: Agent kw_cli does not exist**

### Steps to reproduce

### Create a JSON file for a cli-agent, give it a different name from the agent name inside it.

```
> /agent list

blank
* kw_cli

> /agent edit -n kw_cli

Failed to execute command: Agent kw_cli does not exist

```

### Fix, rename the file to match the agent name.

`mv ~/.aws/amazonq/cli-agents/kw_cli_agent_config.json ~/.aws/amazonq/cli-agents/kw_cli.json`

### Environment

```yaml
[q-details]
version = "1.16.0"
hash = "8417df71be2c2090b5fd08c91561fda44d7e7566"
date = "2025-09-16T21:42:39.51462Z (17h ago)"

[system-info]
chip = "Intel(R) Core(TM) i5-10500T CPU @ 2.30GHz"
total-cores = 6
memory = "7.63 GB"

[system-info.os.linux]
kernel_version = "6.6.87.2-microsoft-standard-WSL2"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 24.04.3 LTS"
version_id = "24.04"
version = "24.04.3 LTS (Noble Numbat)"

[environment]
in-wsl = true

[chat-settings]

[chat-trusted_tools]
use_aws=trusted
execute_bash=trusted
fs_write=trusted
fs_read=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=kw_cli
profile_context=
AmazonQ.md
README.md
.amazonq/rules/**/*.md
docs/*.md
```

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.