From 7cf97e5d3606dfac157e53f5d2449e08aa664464 Mon Sep 17 00:00:00 2001 From: "mingholy.lmh" Date: Wed, 4 Feb 2026 18:32:39 +0800 Subject: [PATCH 1/2] fix: clarify is_background parameter is required in docs and examples Co-authored-by: Qwen-Coder --- .../core/__snapshots__/prompts.test.ts.snap | 100 +++++++++++------- packages/core/src/core/prompts.test.ts | 4 +- packages/core/src/core/prompts.ts | 23 ++-- packages/core/src/tools/shell.ts | 2 +- 4 files changed, 79 insertions(+), 50 deletions(-) diff --git a/packages/core/src/core/__snapshots__/prompts.test.ts.snap b/packages/core/src/core/__snapshots__/prompts.test.ts.snap index 0c0b6c6ad..1072c956a 100644 --- a/packages/core/src/core/__snapshots__/prompts.test.ts.snap +++ b/packages/core/src/core/__snapshots__/prompts.test.ts.snap @@ -149,7 +149,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -173,7 +173,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -194,7 +194,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -383,7 +383,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -407,7 +407,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -428,7 +428,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -597,7 +597,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -621,7 +621,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -642,7 +642,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -811,7 +811,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -835,7 +835,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -856,7 +856,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1025,7 +1025,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -1049,7 +1049,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1070,7 +1070,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1239,7 +1239,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -1263,7 +1263,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1284,7 +1284,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1453,7 +1453,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -1477,7 +1477,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1498,7 +1498,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1667,7 +1667,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -1691,7 +1691,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1712,7 +1712,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1881,7 +1881,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -1905,7 +1905,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1926,7 +1926,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -2097,7 +2097,7 @@ model: true user: start the server implemented in server.js model: -{"name": "run_shell_command", "arguments": {"command": "node server.js &"}} +{"name": "run_shell_command", "arguments": {"command": "node server.js &", "is_background": true}} @@ -2131,7 +2131,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest"}} +{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2160,7 +2160,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "run_shell_command", "arguments": {"command": "npm run test"}} +{"name": "run_shell_command", "arguments": {"command": "npm run test", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2332,12 +2332,15 @@ model: true user: start the server implemented in server.js -model: +model: node server.js & + +true + @@ -2404,6 +2407,9 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest + +false + (After verification passes) @@ -2449,6 +2455,9 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test + +false + (After verification passes) @@ -2631,7 +2640,7 @@ model: true user: start the server implemented in server.js model: -{"name": "run_shell_command", "arguments": {"command": "node server.js &"}} +{"name": "run_shell_command", "arguments": {"command": "node server.js &", "is_background": true}} @@ -2665,7 +2674,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest"}} +{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2694,7 +2703,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "run_shell_command", "arguments": {"command": "npm run test"}} +{"name": "run_shell_command", "arguments": {"command": "npm run test", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2866,12 +2875,15 @@ model: true user: start the server implemented in server.js -model: +model: node server.js & + +true + @@ -2938,6 +2950,9 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest + +false + (After verification passes) @@ -2983,6 +2998,9 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test + +false + (After verification passes) @@ -3159,7 +3177,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -3183,7 +3201,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -3204,7 +3222,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -3373,7 +3391,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: run_shell_command for 'node server.js &' because it must run in the background] +model: [tool_call: run_shell_command for 'node server.js &' with is_background: true because it must run in the background] @@ -3397,7 +3415,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -3418,7 +3436,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test'] +[tool_call: run_shell_command for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. diff --git a/packages/core/src/core/prompts.test.ts b/packages/core/src/core/prompts.test.ts index a232b50f7..7a9799433 100644 --- a/packages/core/src/core/prompts.test.ts +++ b/packages/core/src/core/prompts.test.ts @@ -302,7 +302,9 @@ describe('Model-specific tool call formats', () => { // Should contain JSON-style tool calls expect(prompt).toContain(''); expect(prompt).toContain('{"name": "run_shell_command"'); - expect(prompt).toContain('"arguments": {"command": "node server.js &"}'); + expect(prompt).toContain( + '"arguments": {"command": "node server.js &", "is_background": true}', + ); expect(prompt).toContain(''); // Should NOT contain bracket-style tool calls diff --git a/packages/core/src/core/prompts.ts b/packages/core/src/core/prompts.ts index 8d3ff4683..20e83cd49 100644 --- a/packages/core/src/core/prompts.ts +++ b/packages/core/src/core/prompts.ts @@ -447,7 +447,7 @@ model: true user: start the server implemented in server.js -model: [tool_call: ${ToolNames.SHELL} for 'node server.js &' because it must run in the background] +model: [tool_call: ${ToolNames.SHELL} for 'node server.js &' with is_background: true because it must run in the background] @@ -471,7 +471,7 @@ Here's the plan: [tool_call: ${ToolNames.EDIT} for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: ${ToolNames.SHELL} for 'ruff check src/auth.py && pytest'] +[tool_call: ${ToolNames.SHELL} for 'ruff check src/auth.py && pytest' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -492,7 +492,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: ${ToolNames.WRITE_FILE} for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: ${ToolNames.SHELL} for 'npm run test'] +[tool_call: ${ToolNames.SHELL} for 'npm run test' with is_background: false] (After verification passes) All checks passed. This is a stable checkpoint. @@ -523,12 +523,15 @@ model: true user: start the server implemented in server.js -model: +model: node server.js & + +true + @@ -595,6 +598,9 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest + +false + (After verification passes) @@ -640,6 +646,9 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test + +false + (After verification passes) @@ -679,7 +688,7 @@ model: true user: start the server implemented in server.js model: -{"name": "${ToolNames.SHELL}", "arguments": {"command": "node server.js &"}} +{"name": "${ToolNames.SHELL}", "arguments": {"command": "node server.js &", "is_background": true}} @@ -713,7 +722,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "${ToolNames.SHELL}", "arguments": {"command": "ruff check src/auth.py && pytest"}} +{"name": "${ToolNames.SHELL}", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -742,7 +751,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "${ToolNames.SHELL}", "arguments": {"command": "npm run test"}} +{"name": "${ToolNames.SHELL}", "arguments": {"command": "npm run test", "is_background": false}} (After verification passes) All checks passed. This is a stable checkpoint. diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index a02412626..ca898c4c4 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -543,7 +543,7 @@ export class ShellTool extends BaseDeclarativeTool< is_background: { type: 'boolean', description: - 'Whether to run the command in background. Default is false. Set to true for long-running processes like development servers, watchers, or daemons that should continue running without blocking further commands.', + 'Whether to run the command in background. This parameter is required to ensure explicit decision-making. Set to true for long-running processes like development servers, watchers, or daemons that should continue running without blocking further commands. Set to false for one-time commands that should complete before proceeding.', }, timeout: { type: 'number', From b2659c5da1f4f9ef395d20fbf539c88661758b7d Mon Sep 17 00:00:00 2001 From: "mingholy.lmh" Date: Thu, 5 Feb 2026 16:40:49 +0800 Subject: [PATCH 2/2] fix(core): make is_background optional with clearer examples - Change is_background from required to optional parameter - Remove explicit is_background:false from examples where it's not needed - Keep is_background:true in examples for long-running background processes - Update test snapshots accordingly Co-authored-by: Qwen-Coder --- .../core/__snapshots__/prompts.test.ts.snap | 64 ++++++++----------- packages/core/src/core/prompts.ts | 14 ++-- packages/core/src/tools/shell.ts | 4 +- 3 files changed, 32 insertions(+), 50 deletions(-) diff --git a/packages/core/src/core/__snapshots__/prompts.test.ts.snap b/packages/core/src/core/__snapshots__/prompts.test.ts.snap index 1072c956a..69481949b 100644 --- a/packages/core/src/core/__snapshots__/prompts.test.ts.snap +++ b/packages/core/src/core/__snapshots__/prompts.test.ts.snap @@ -173,7 +173,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -194,7 +194,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -407,7 +407,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -428,7 +428,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -621,7 +621,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -642,7 +642,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -835,7 +835,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -856,7 +856,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1049,7 +1049,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1070,7 +1070,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1263,7 +1263,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1284,7 +1284,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1477,7 +1477,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1498,7 +1498,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1691,7 +1691,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1712,7 +1712,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -1905,7 +1905,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -1926,7 +1926,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -2131,7 +2131,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} +{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest"}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2160,7 +2160,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "run_shell_command", "arguments": {"command": "npm run test", "is_background": false}} +{"name": "run_shell_command", "arguments": {"command": "npm run test"}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2407,9 +2407,6 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest - -false - (After verification passes) @@ -2455,9 +2452,6 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test - -false - (After verification passes) @@ -2674,7 +2668,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} +{"name": "run_shell_command", "arguments": {"command": "ruff check src/auth.py && pytest"}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2703,7 +2697,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "run_shell_command", "arguments": {"command": "npm run test", "is_background": false}} +{"name": "run_shell_command", "arguments": {"command": "npm run test"}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -2950,9 +2944,6 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest - -false - (After verification passes) @@ -2998,9 +2989,6 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test - -false - (After verification passes) @@ -3201,7 +3189,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -3222,7 +3210,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -3415,7 +3403,7 @@ Here's the plan: [tool_call: edit for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: run_shell_command for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: run_shell_command for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -3436,7 +3424,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: write_file for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: run_shell_command for 'npm run test' with is_background: false] +[tool_call: run_shell_command for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. diff --git a/packages/core/src/core/prompts.ts b/packages/core/src/core/prompts.ts index 20e83cd49..4ad5e38ea 100644 --- a/packages/core/src/core/prompts.ts +++ b/packages/core/src/core/prompts.ts @@ -471,7 +471,7 @@ Here's the plan: [tool_call: ${ToolNames.EDIT} for path 'src/auth.py' replacing old content with new content] Refactoring complete. Running verification... -[tool_call: ${ToolNames.SHELL} for 'ruff check src/auth.py && pytest' with is_background: false] +[tool_call: ${ToolNames.SHELL} for 'ruff check src/auth.py && pytest'] (After verification passes) All checks passed. This is a stable checkpoint. Would you like me to write a commit message and commit these changes? @@ -492,7 +492,7 @@ Now I'll look for existing or related test files to understand current testing c (After reviewing existing tests and the file content) [tool_call: ${ToolNames.WRITE_FILE} for path '/path/to/someFile.test.ts'] I've written the tests. Now I'll run the project's test command to verify them. -[tool_call: ${ToolNames.SHELL} for 'npm run test' with is_background: false] +[tool_call: ${ToolNames.SHELL} for 'npm run test'] (After verification passes) All checks passed. This is a stable checkpoint. @@ -598,9 +598,6 @@ Refactoring complete. Running verification... ruff check src/auth.py && pytest - -false - (After verification passes) @@ -646,9 +643,6 @@ I've written the tests. Now I'll run the project's test command to verify them. npm run test - -false - (After verification passes) @@ -722,7 +716,7 @@ Here's the plan: Refactoring complete. Running verification... -{"name": "${ToolNames.SHELL}", "arguments": {"command": "ruff check src/auth.py && pytest", "is_background": false}} +{"name": "${ToolNames.SHELL}", "arguments": {"command": "ruff check src/auth.py && pytest"}} (After verification passes) All checks passed. This is a stable checkpoint. @@ -751,7 +745,7 @@ Now I'll look for existing or related test files to understand current testing c I've written the tests. Now I'll run the project's test command to verify them. -{"name": "${ToolNames.SHELL}", "arguments": {"command": "npm run test", "is_background": false}} +{"name": "${ToolNames.SHELL}", "arguments": {"command": "npm run test"}} (After verification passes) All checks passed. This is a stable checkpoint. diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index ca898c4c4..d48391b90 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -543,7 +543,7 @@ export class ShellTool extends BaseDeclarativeTool< is_background: { type: 'boolean', description: - 'Whether to run the command in background. This parameter is required to ensure explicit decision-making. Set to true for long-running processes like development servers, watchers, or daemons that should continue running without blocking further commands. Set to false for one-time commands that should complete before proceeding.', + 'Optional: Whether to run the command in background. If not specified, defaults to false (foreground execution). Explicitly set to true for long-running processes like development servers, watchers, or daemons that should continue running without blocking further commands.', }, timeout: { type: 'number', @@ -560,7 +560,7 @@ export class ShellTool extends BaseDeclarativeTool< '(OPTIONAL) The absolute path of the directory to run the command in. If not provided, the project root directory is used. Must be a directory within the workspace and must already exist.', }, }, - required: ['command', 'is_background'], + required: ['command'], }, false, // output is not markdown true, // output can be updated