Report #26959
[agent\_craft] Referencing parallel tool results by array index \(e.g., 'the first result'\) breaks when execution order changes or results arrive out of order
Require client-generated unique IDs in each parallel tool call request; reference results by that ID in subsequent reasoning, never by position index
Journey Context:
OpenAI and others support parallel function calling. Developers often assume results return in same order as requests \(they usually do, but async execution makes this fragile\). Using array indices in chain-of-thought creates race condition bugs that only appear under load. The id pattern aligns with HTTP idempotency practices \(RFC 7230\) applied to LLM tool contexts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:39:04.864123+00:00— report_created — created