@@ -8,13 +8,7 @@ import { truncateToVisualLines } from "../../modes/interactive/components/visual
88import { theme } from "../../modes/interactive/theme/theme.js" ;
99import type { AgentTool } from "../../runtime/index.js" ;
1010import { waitForChildProcess } from "../../utils/child-process.js" ;
11- import {
12- getShellConfig ,
13- getShellEnv ,
14- killProcessTree ,
15- trackDetachedChildPid ,
16- untrackDetachedChildPid ,
17- } from "../../utils/shell.js" ;
11+ import { getShellConfig , getShellEnv , killProcessTree } from "../../utils/shell.js" ;
1812import type { ToolDefinition , ToolRenderResultOptions } from "../extensions/types.js" ;
1913import type { BashOperations } from "./bash-operations.js" ;
2014import { OutputAccumulator } from "./output-accumulator.js" ;
@@ -68,9 +62,6 @@ export function createLocalBashOperations(options?: { shellPath?: string }): Bas
6862 stdio : [ "ignore" , "pipe" , "pipe" ] ,
6963 windowsHide : true ,
7064 } ) ;
71- if ( child . pid ) {
72- trackDetachedChildPid ( child . pid ) ;
73- }
7465 let timedOut = false ;
7566 let timeoutHandle : NodeJS . Timeout | undefined ;
7667 const timeoutMs = resolveBashTimeoutMs ( timeout ) ;
@@ -102,9 +93,6 @@ export function createLocalBashOperations(options?: { shellPath?: string }): Bas
10293 // on inherited stdio handles held by detached descendants.
10394 waitForChildProcess ( child )
10495 . then ( ( code ) => {
105- if ( child . pid ) {
106- untrackDetachedChildPid ( child . pid ) ;
107- }
10896 if ( timeoutHandle ) {
10997 clearTimeout ( timeoutHandle ) ;
11098 }
@@ -122,9 +110,6 @@ export function createLocalBashOperations(options?: { shellPath?: string }): Bas
122110 resolve ( { exitCode : code } ) ;
123111 } )
124112 . catch ( ( err ) => {
125- if ( child . pid ) {
126- untrackDetachedChildPid ( child . pid ) ;
127- }
128113 if ( timeoutHandle ) {
129114 clearTimeout ( timeoutHandle ) ;
130115 }
0 commit comments