File tree Expand file tree Collapse file tree
packages/agent-core-v2/test/os/backends/node-local/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1307,6 +1307,25 @@ describe('BashTool', () => {
13071307 expect ( description ) . toContain ( 'run_in_background=true' ) ;
13081308 } ) ;
13091309
1310+ it ( 'strips every background sentence from the description when background execution is off' , ( ) => {
1311+ const { runner } = createTestRunner ( processWithOutput ( ) ) ;
1312+ const tool = bashTool (
1313+ runner ,
1314+ createTestEnv ( ) ,
1315+ createTestCtx ( ) ,
1316+ createFakeTaskService ( ) . service ,
1317+ stubToolPolicy ( ( name ) => name !== 'TaskList' ) ,
1318+ ) ;
1319+
1320+ const description = tool . description ;
1321+ expect ( description ) . toContain ( 'Background execution is disabled for this agent.' ) ;
1322+ expect ( description ) . not . toContain ( 'background-task panel' ) ;
1323+ expect ( description ) . not . toContain ( 'run_in_background=true`,' ) ;
1324+ expect ( description ) . not . toContain ( 'move a running foreground command to the background' ) ;
1325+ expect ( description ) . not . toContain ( 'moved to the background instead of being killed' ) ;
1326+ expect ( description ) . toContain ( 'a foreground command that hits its timeout is killed' ) ;
1327+ } ) ;
1328+
13101329 it ( 'disables background execution when TaskList is inactive even if TaskOutput/TaskStop are active' , async ( ) => {
13111330 const { runner, exec } = createTestRunner ( processWithOutput ( ) ) ;
13121331 const tool = bashTool (
You can’t perform that action at this time.
0 commit comments