aws / aws/amazon-q-developer-cli

Chat prompt shows incorrect agent name after switching default agent

Aperta
#2,985 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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.7.0 (24G222)

### Expected behaviour

The chat prompt should update to reflect the currently active agent. It should either show "[default] >" or no agent indicator if using the default agent, not continue showing the previous agent name.

### Actual behaviour

After switching from 'amzn-builder' to 'default' agent using 'q agent set-default --name default' and restarting Q CLI, the chat prompt still displays "[amzn-builder] >" even though the default agent has been changed and the functionality is using the new agent configuration.

```
[chat-transcript]
Perfect! The bug report has been filed. This will help the Q CLI team understand that:

**Customer Impact:**
- "Legacy" terminology creates confusion in demos and documentation
- Makes standard functionality appear outdated
- Could discourage adoption of global MCP configuration

**Business Case:**
- Global MCP configuration is the primary use case for most users
- Agent-specific MCP is the specialized/advanced feature
- Naming should reflect this hierarchy

Your Q CLI is now running with the full MCP server suite you wanted, and your teammates will have everything they need to replicate the setup safely. The bug report should help improve the experience for future users too.

Happy to help anytime!
[Tool uses: none]

> this is not important but it is strange. we moved away from a limited agent to a global config. But, the cmd prompt is listed as "[amzn-builder] >"

That is strange! The prompt is still showing `[amzn-builder]` even though we switched to the `default` agent. Let me check what's happening:
[Tool uses: execute_bash]

[Tool uses: execute_bash]

The prompt might be cached or there could be a delay in the agent switch. A few possibilities:

1. **Chat session persistence** - The current chat session might still be using the old agent
2. **Prompt caching** - The terminal prompt might not have updated yet
3. **Agent switch delay** - The change might not have fully propagated

**Quick fixes to try:**

1. **Exit and restart the chat session completely**
2. **Check if a new chat session shows the correct agent**

The functionality should be correct (you're using global MCP servers), but the prompt display might be lagging behind. This is likely a cosmetic UI issue rather than a functional problem.

If it persists, this could be another minor bug to report - the prompt should reflect the active agent accurately.
[Tool uses: none]

> bug or expected?

**Bug.**

The prompt should reflect the active agent. If you're using the `default` agent, it should either show:
- `[default] >`
- No agent indicator (since it's the default)
- Some other clear indication

Showing `[amzn-builder] >` when you've switched away from that agent is misleading and could cause confusion about which tools/servers are actually available.

This is a UI consistency bug - the prompt display isn't syncing with the actual agent configuration change.
[Tool uses: none]

> let's file a bug for it

[Tool uses: report_issue]

(...truncated)
```

### Steps to reproduce

1. Start with 'amzn-builder' as default agent (prompt shows "[amzn-builder] >")
2. Run 'q agent set-default --name default'
3. Run 'q restart' to apply changes
4. Start new chat session
5. Notice prompt still shows "[amzn-builder] >" despite agent switch

### Environment

```yaml

[q-details]
version = "1.16.2"
hash = "c4c80bb44cb22b6e19129ed7475f2793ff20135d"
date = "2025-09-19T01:27:56.356289Z (6d ago)"

[system-info]
os = "macOS 15.7.0 (24G222)"
chip = "Apple M2 Pro"
total-cores = 10
memory = "16.00 GB"

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

[env-vars]
PATH = "/Users/USER/.local/bin:/Users/USER/.toolbox/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"
QTERM_SESSION_ID = "269eee9b69794b3da536b395d53163be"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.16.2"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "org.tabby"

[chat-settings]

[chat-trusted_tools]
@builder-mcp/TaskeiGetTask=trusted
@builder-mcp/TaskeiGetRooms=trusted
@builder-mcp/TicketingReadActions=trusted
fs_read=trusted
execute_bash=trusted
fs_write=trusted
@builder-mcp/ReadInternalWebsites=trusted
@builder-mcp/InternalSearch=trusted
@builder-mcp/InternalCodeSearch=trusted
@builder-mcp/TaskeiListTasks=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=amzn-builder
profile_context=none

files=none
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando lo stato di selezione dell'agente utilizzato da `q agent set-default --name default`, `q restart` e dal prompt della nuova sessione di chat. Riproduci il passaggio da `amzn-builder` a `default` e verifica da dove il prompt ottiene il nome visualizzato dell'agente. Il lavoro è completato quando il prompt riflette l'agente predefinito attivo invece di mantenere il nome precedente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.