Parallel tool calls intermittently lose or mangle `tool_id`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust, typescript
- 領域
- ai-infra-agents, cli, tooling
調査の方向性
The report traces the failure through multi_tool_use.parallel batch assembly and the functions.tool_call wrapper, but does not identify source files or tests. Start by locating those entry points and tracing how nested tool_id values are passed through; internal runtime traces may be needed to distinguish generation from wrapper behavior. Done means malformed IDs are caught before dispatch with a deterministic diagnostic or sequential fallback, with coverage for missing, non-string, and unqualified IDs.
索引モデルが issue の本文から書いたものです。
説明
Checks
- I have searched github.com/aws/amazon-q-developer-cli/issues and there are no duplicates of my issue
- I have run
q doctorin the affected terminal session - I have run
q restartand replicated the issue again
Operating system
macOS 26.5.1 (25F80)
Expected behaviour
Expected behavior
Validate each nested call before the parallel batch is dispatched. For every nested item:
tool_idis present,tool_idis a string,tool_idis fully namespaced (<server>::<tool>).
If any item fails validation:
- do not dispatch the batch with the malformed item,
- return a deterministic, local diagnostic that names the offending item, or
- fall back to dispatching the calls sequentially.
A clear pre-dispatch validation error (naming which nested call lacks a valid namespaced tool_id)
is far more actionable than the current opaque received undefined.
Actual behaviour
Summary
When the agent emits multiple tool calls in parallel, the runtime wraps them in a
multi_tool_use.parallel payload and converts each nested item into a functions.tool_call.
Intermittently, an individual nested call is malformed: it either omits the required tool_id,
or carries a non-namespaced id (e.g. some_tool instead of server-name::some_tool).
The runtime then rejects the call at input validation, before the tool runs:
Invalid input for tool_call — tool_id: expected string, received undefined
or rejects an unknown (unqualified) tool id before dispatch.
Impact
- Non-deterministic: the same logical call succeeds on one turn and fails on another.
- Independent of user-supplied parameters — the arguments object is well-formed; only the
envelope'stool_idfield is affected. - Blocks individual steps in multi-step / parallel workflows. The agent must retry, often
serializing calls as a manual workaround.
Where it happens (observed)
The failure occurs upstream of the actual tool server, in the orchestration chain:
agent output → multi_tool_use.parallel (batch assembly) → functions.tool_call (per-item wrapper) → tool server
By the time the request reaches any downstream MCP server/proxy, it is already a single resolved
call — the tool_id is either present or already lost. The downstream server only sees input
validation fail; it is not the source.
Root cause (hypothesis)
The field is lost or mis-formed at the multi_tool_use.parallel → functions.tool_call step —
either during model generation of the parallel batch, or in the parallel-wrapper orchestration that
converts batch items into individual tool_calls.
Unknown without internal traces: which of the two (model generation vs. wrapper orchestration)
drops the field. This cannot be isolated from outside the runtime.
Steps to reproduce
Reproduction notes
- Not tied to a specific tool or specific arguments — any parallel batch can exhibit it.
- Intermittent; higher chance with larger parallel batches.
- Reproducing reliably likely requires internal runtime tracing of the batch-assembly step.
Environment
<This will be visible to anyone. Do not include personal or sensitive information>
[q-details]
version = "2.29.1"
hash = "31e6bb3fad4a1fff9ba23aee436cef61c8579a58"
date = "2026-10-10T03:23:46.20488Z (1d ago)"
variant = "full"
[system-info]
os = "macOS 26.5.1 (25F80)"
chip = "Apple M4"
total-cores = 10
memory = "24.00 GB"
[environment]
cwd = "/Users/USER/portfolio-agent-runtime"
cli-path = "/Users/USER/portfolio-agent-runtime"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "unknown"
[env-vars]
PATH = "/Users/USER/.bun/bin:/Users/USER/.nvm/versions/node/v24.20.0/bin:/Users/USER/Library/Python/3.13/bin:/Users/USER/.local/bin:/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:/pkg/env/global/bin:/opt/homebrew/bin:/Applications/iTerm.app/Contents/Resources/utilities"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
- 主要言語
- Rust
- スター
- 2k
- フォーク
- 441
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/amazon-q-developer-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/amazon-q-developer-cli#3898 ·
-
bug: invalid JSON in agent-format.md `allowedTools` Examples block (JS `//` comments + unquoted `@builtin`) breaks copy-paste対応中かも @ken-jo が 116 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
aws/amazon-q-developer-cli#3851 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
aws/amazon-q-developer-cli#3316 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/amazon-q-developer-cli#3023 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
aws/amazon-q-developer-cli#3929 ·
aws/amazon-q-developer-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
V1 manifest lists written by Java lose added/existing/deleted file counts対応中かも @kacper-li-airspace-intelligence が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-rust#3445 ·
メンテナーはふだん 4 日以内に返信
-
area::tern-sync kind::cleanup triage::ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
review-bot
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
midagedev/bloomery#160 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
oxidecomputer/humility#737 ·