aws / aws/amazon-q-developer-cli

bug: ACP: Permission requests arrive in random order for parallel tool calls

Aperta
#3,657 0 commenti 1 reazione 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 Sequoia

### Expected behaviour

Permission requests arrive in the same order as tool_call updates

### Actual behaviour

When connecting to Kiro CLI via ACP and the agent executes multiple tool calls in parallel, the `requestPermission` requests arrive in a random order compared to the corresponding `tool_call` session updates.

Example (from ACP client debug logs):

```
// tool_call updates arrive in order:
sessionUpdate: tool_call, title: "Running: ls -a", toolCallId: "tooluse_A..."
sessionUpdate: tool_call, title: "Running: ls -l", toolCallId: "tooluse_B..."
sessionUpdate: tool_call, title: "Running: ls -la", toolCallId: "tooluse_C..."
sessionUpdate: tool_call, title: "Running: ls", toolCallId: "tooluse_D..."

// Permission requests arrive in random order:
Permission request: toolCallId: "tooluse_B..." (ls -l)
Permission request: toolCallId: "tooluse_D..." (ls)
Permission request: toolCallId: "tooluse_A..." (ls -a)
Permission request: toolCallId: "tooluse_C..." (ls -la)
```

This causes the ACP client to show permission prompts in an unexpected order, which is confusing when there are many parallel tool calls.

### Steps to reproduce

1. Connect to Kiro CLI via ACP (e.g., using an ACP client)
2. Send a prompt that triggers multiple parallel tool calls (e.g., "run `ls -a`, `ls -l`, `ls -la`, and `ls`")
3. Observe the order of `session/update` (tool_call) and `requestPermission` messages

Observed via [obsidian-agent-client](https://github.com/RAIT-09/obsidian-agent-client) (ref: RAIT-09/obsidian-agent-client#124).

### Environment

```yaml
[q-details]
version = "1.26.2"
hash = "a8687141fdf1e599719c4da99f88f338aba93537"
date = "2026-02-18T03:22:58.712286Z (10d ago)"
variant = "full"

[system-info]
os = "macOS 15.7.4 (24G517)"
chip = "Apple M4"
total-cores = 10
memory = "32.00 GB"

[environment]
cwd = "/Users/USER/Documents/dev_vault"
cli-path = "/Users/USER/Documents/dev_vault"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "Ghostty"
install-method = "unknown"

[env-vars]
DISPLAY = "/private/tmp/com.apple.launchd.yIyPRxUHai/org.xquartz:0"
PATH = "/Users/USER/.nvm/versions/node/v22.18.0/bin:/Users/USER/.local/bin:/Users/USER/.pyenv/shims:/Users/USER/.pyenv/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:/opt/X11/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/USER/.cargo/bin:/Applications/Ghostty.app/Contents/MacOS:/Users/USER/.local/bin:/Users/USER/.orbstack/bin:/Users/USER/development/flutter/bin:/Users/USER/.lmstudio/bin:/Users/USER/Library/Android/sdk/platform-tools"
QTERM_SESSION_ID = "17c4ecc0eec64b18aaa197a32c9bf8c3"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.26.2"
SHELL = "/bin/zsh"
TERM = "xterm-ghostty"
__CFBundleIdentifier = "com.mitchellh.ghostty"
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo lo scenario di chiamate parallele agli strumenti tramite ACP e confronta l’ordine dei messaggi session/update e tool_call con i messaggi requestPermission, usando i comandi di esempio nell’issue. Il lavoro è completo quando le richieste di autorizzazione seguono in modo coerente il corrispondente ordine degli aggiornamenti tool_call per le chiamate parallele.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.