Skip to content

Commit ad917ac

Browse files
committed
fix: prevent some agents from hanging indefinitely
Some agent processes don't seem to execute until stdin has ended. These changes add it to the `BaseCliAgentRunner`.
1 parent 498c5a5 commit ad917ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runner/codegen/base-cli-agent-runner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ export abstract class BaseCliAgentRunner {
232232
env: {...process.env},
233233
});
234234

235+
// Important! some agents won't start executing until stdin has ended.
236+
childProcess.stdin.end();
237+
235238
childProcess.on('close', code =>
236239
finalize(
237240
`${this.displayName} process has exited` + (code == null ? '.' : ` with ${code} code.`),

0 commit comments

Comments
 (0)