Skip to content

Commit 673e79f

Browse files
tweak(batch): up restrictive max batch tool from 10 to 25 (anomalyco#9275)
1 parent 79ae749 commit 673e79f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/opencode/src/tool/batch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const BatchTool = Tool.define("batch", async () => {
3333
const { Session } = await import("../session")
3434
const { Identifier } = await import("../id/id")
3535

36-
const toolCalls = params.tool_calls.slice(0, 10)
37-
const discardedCalls = params.tool_calls.slice(10)
36+
const toolCalls = params.tool_calls.slice(0, 25)
37+
const discardedCalls = params.tool_calls.slice(25)
3838

3939
const { ToolRegistry } = await import("./registry")
4040
const availableTools = await ToolRegistry.tools({ modelID: "", providerID: "" })
@@ -139,14 +139,14 @@ export const BatchTool = Tool.define("batch", async () => {
139139
state: {
140140
status: "error",
141141
input: call.parameters,
142-
error: "Maximum of 10 tools allowed in batch",
142+
error: "Maximum of 25 tools allowed in batch",
143143
time: { start: now, end: now },
144144
},
145145
})
146146
results.push({
147147
success: false as const,
148148
tool: call.tool,
149-
error: new Error("Maximum of 10 tools allowed in batch"),
149+
error: new Error("Maximum of 25 tools allowed in batch"),
150150
})
151151
}
152152

packages/opencode/src/tool/batch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Payload Format (JSON array):
66
[{"tool": "read", "parameters": {"filePath": "src/index.ts", "limit": 350}},{"tool": "grep", "parameters": {"pattern": "Session\\.updatePart", "include": "src/**/*.ts"}},{"tool": "bash", "parameters": {"command": "git status", "description": "Shows working tree status"}}]
77

88
Notes:
9-
- 1–10 tool calls per batch
9+
- 1–20 tool calls per batch
1010
- All calls start in parallel; ordering NOT guaranteed
1111
- Partial failures do not stop other tool calls
1212
- Do NOT use the batch tool within another batch tool.

0 commit comments

Comments
 (0)