Bug: Permissioned tools in batched calls run out of order #2705

Open
opened 2026-02-16 17:36:54 -05:00 by yindo · 2 comments
Owner

Originally created by @riatzukiza on GitHub (Nov 8, 2025).

Originally assigned to: @rekram1-node on GitHub.

Summary:
When multiple tools are called in one batch and one requires permission, non-permissioned tools execute first while the permissioned tool is delayed. This changes the execution order from what the model requested and breaks assumptions about sequencing.

Steps:

  1. In one turn, request tools in order: A (no permission), B (needs permission), C (no permission, expects B to have run).
  2. Approve permission for B.
  3. Observe execution order.

Actual:

  • A runs.
  • C may run before B.
  • B runs only after approval.
  • Effective order: A, C, B.

Expected:

  • Either:
    • preserve requested order (block tools after B until B is resolved), or
    • define batched calls as parallel but expose actual order/status so the model can reason correctly.

Impact:

  • Confusing for the model and user.
  • Breaks dependency assumptions between tools.
  • Wastes tokens as the model recovers from unexpected state.
Originally created by @riatzukiza on GitHub (Nov 8, 2025). Originally assigned to: @rekram1-node on GitHub. Summary: When multiple tools are called in one batch and one requires permission, non-permissioned tools execute first while the permissioned tool is delayed. This changes the execution order from what the model requested and breaks assumptions about sequencing. Steps: 1. In one turn, request tools in order: A (no permission), B (needs permission), C (no permission, expects B to have run). 2. Approve permission for B. 3. Observe execution order. Actual: - A runs. - C may run before B. - B runs only after approval. - Effective order: A, C, B. Expected: - Either: - preserve requested order (block tools after B until B is resolved), or - define batched calls as parallel but expose actual order/status so the model can reason correctly. Impact: - Confusing for the model and user. - Breaks dependency assumptions between tools. - Wastes tokens as the model recovers from unexpected state.
yindo added the bug label 2026-02-16 17:36:54 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 8, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3944: Concurrent permissions cause app to freeze when parallel tool calls require permissions
  • #2882: Parallel edit tool calls on same file error out, showing execution order problems
  • #3856: Race condition when applying changes sequentially, suggesting tool execution timing issues

The most relevant is #3944 which directly deals with permission-related problems in concurrent/parallel tool execution scenarios.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 8, 2025): This issue might be a duplicate of existing issues. Please check: - #3944: Concurrent permissions cause app to freeze when parallel tool calls require permissions - #2882: Parallel edit tool calls on same file error out, showing execution order problems - #3856: Race condition when applying changes sequentially, suggesting tool execution timing issues The most relevant is #3944 which directly deals with permission-related problems in concurrent/parallel tool execution scenarios. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 8, 2025):

Relates to:

#2882
#3856

@rekram1-node commented on GitHub (Nov 8, 2025): Relates to: #2882 #3856
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2705