Skip to content

tweak: experimental batch, up restrictive max batch tool from 10 to 25 #9275

Merged
rekram1-node merged 5 commits into
anomalyco:devfrom
spoons-and-mirrors:batch/max-tool-number-and-execution-stagger
Jan 19, 2026
Merged

tweak: experimental batch, up restrictive max batch tool from 10 to 25 #9275
rekram1-node merged 5 commits into
anomalyco:devfrom
spoons-and-mirrors:batch/max-tool-number-and-execution-stagger

Conversation

@spoons-and-mirrors

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR ups the max tool number batch can accept from 10 to 25 (I had originally set 10 thinking it was fine, but I now realise that it was somewhat arbitrary and doesn't necessarily plays well with models such as GPT 5.x

This PR also staggers the tool calling by 50ms, which gives a much better visual experience of the batch tool (UX win for a maximum of 1sec additional latency on the whole batch execution)

I initially had hopes it would fix the random tool duplication that happens when using batch, but this one is still out there...

How did you verify your code works?

Used it, works as expected.

…alues

- fix: stagger batch firing
- tweak: max 25 tools
@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title tweak(batch): up batch tool restrictive max tool number doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@spoons-and-mirrors spoons-and-mirrors changed the title tweak(batch): up batch tool restrictive max tool number tweak(batch): up restrictive max batch tool from 10 to 25 - add tool execution stagger (50ms) so it looks cooler Jan 18, 2026
Comment thread packages/opencode/src/tool/batch.ts Outdated
}

const results = await Promise.all(toolCalls.map((call) => executeCall(call)))
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u should just Bun.sleep

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👌

@spoons-and-mirrors spoons-and-mirrors marked this pull request as draft January 19, 2026 03:54
@spoons-and-mirrors

Copy link
Copy Markdown
Contributor Author

wait... i'm experiencing batch edits applied in duplicate, needs more thorough checking to verify if this was a model thing or due to the staggered tool firing paired up with the tool duplication bug of batch.

putting this one as DRAFT for now

@spoons-and-mirrors spoons-and-mirrors changed the title tweak(batch): up restrictive max batch tool from 10 to 25 - add tool execution stagger (50ms) so it looks cooler tweak(batch): up restrictive max batch tool from 10 to 25 Jan 19, 2026
@spoons-and-mirrors spoons-and-mirrors marked this pull request as ready for review January 19, 2026 14:52
@spoons-and-mirrors

Copy link
Copy Markdown
Contributor Author

Confirmed, staggering triggers edit in duplicate, reveals an underlying issue that this PR is not addressing.
Reverting to just changing the max tool number that batch can accept

@rekram1-node rekram1-node changed the title tweak(batch): up restrictive max batch tool from 10 to 25 tweak: experimental batch, up restrictive max batch tool from 10 to 25 Jan 19, 2026
@rekram1-node rekram1-node merged commit 673e79f into anomalyco:dev Jan 19, 2026
3 checks passed
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants