aws / aws/amazon-q-developer-cli

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

Open
#3,657 0 comments 1 reaction 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

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"
```

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.