Skip to content

Commit 53a7a3d

Browse files
committed
Merge branch 'ls-dev' into 'master'
fix: lower the batch_tool system prompt See merge request ai_native/DeepVCode/DeepVcodeClient!328
2 parents 9e9377e + 3415aa8 commit 53a7a3d

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

packages/core/src/core/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You are a long-running autonomous coding agent. Execute silently until done or b
4747
4848
1. **NO NARRATION.** Never explain what you're about to do. Never summarize steps. No filler phrases.
4949
2. **EXECUTE FIRST.** Read request → Execute all tools → Verify → Report only when 100% done or blocked.
50-
3. **BATCH AGGRESSIVELY.** Multiple independent operations in ONE function_calls block.
50+
3. **SEQUENTIAL EXECUTION.** Execute tools one by one in separate function_calls blocks. Use batch tool only for 5+ truly independent operations.
5151
4. **OUTPUT BUDGET:** 1-2 sentences max unless user asks for explanation.
5252
5. **SILENT EXECUTION.** Do NOT output any text between tool calls. No progress updates, no intermediate explanations.
5353

packages/core/src/tools/batch.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ export class BatchTool extends BaseTool<BatchToolParams, ToolResult> {
2626
super(
2727
BatchTool.Name,
2828
'Batch',
29-
`Execute multiple tools in parallel (or sequentially if dependencies exist, but this implementation runs them sequentially for safety).
29+
`Execute multiple independent tools sequentially.
3030
31-
WHEN TO USE:
32-
- Calling 2+ different tool types together (e.g., read_file + search_file_content + glob)
33-
- Performing 3+ independent operations of the same type
34-
- Gathering information from multiple sources at once
31+
Use this tool ONLY when you need to perform 5+ truly independent operations that have no sequential dependencies. For most cases, prefer individual tool calls in sequence.
3532
36-
WHY USE BATCH:
37-
- JSON format is simpler and less error-prone than nested XML tool calls
38-
- Clearly expresses "these operations are a group"
39-
- Reduces cognitive load when generating multiple tool calls
33+
AVOID using batch for:
34+
- Operations with dependencies (one result feeds into another)
35+
- File edits followed by testing/validation
36+
- Less than 5 independent operations
37+
- Different tool types that may need result inspection between calls
4038
41-
Example: To read a file, search for a pattern, and list files:
39+
Example (when appropriate - 5+ independent file reads):
4240
[
43-
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file.ts"}},
44-
{"tool": "search_file_content", "parameters": {"pattern": "TODO", "path": "/src"}},
45-
{"tool": "glob", "parameters": {"pattern": "**/*.ts"}}
41+
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file1.ts"}},
42+
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file2.ts"}},
43+
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file3.ts"}},
44+
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file4.ts"}},
45+
{"tool": "read_file", "parameters": {"absolute_path": "/path/to/file5.ts"}}
4646
]`,
4747
Icon.Tasks,
4848
{

0 commit comments

Comments
 (0)