What happened?
packages/cli/src/services/prompt-processors/shellProcessor.ts:171-178 executes every !{cmd} injection with a fresh, never-linked AbortController, serially:
const { result } = await ShellExecutionService.execute(
injection.resolvedCommand,
config.getTargetDir(),
() => {},
new AbortController().signal,
...
);
User Ctrl+C / caller abort never reaches the child; the for...of loop awaits each command with no per-command timeout. One hung custom command blocks the whole prompt pipeline.
What did you expect to happen?
Thread the caller's AbortSignal into process()/CommandContext, run with per-command timeout, kill on abort, and continue or fail gracefully with a visible message.
Client information
- Repo
google-gemini/gemini-cli @ main 9c1b0a610
- Area
packages/cli/src/services/prompt-processors/shellProcessor.ts:155-180
- Platform: interactive CLI with
!{sleep 60} custom command
Login information
N/A — repro: prompt containing hung !{...} + Ctrl+C still blocks.
Anything else we need to know?
Fix direction: accept AbortSignal param, Promise.allSettled with timeout + abort-kill, test asserting abort terminates child and pipeline continues.
What happened?
packages/cli/src/services/prompt-processors/shellProcessor.ts:171-178executes every!{cmd}injection with a fresh, never-linkedAbortController, serially:User Ctrl+C / caller abort never reaches the child; the
for...ofloop awaits each command with no per-command timeout. One hung custom command blocks the whole prompt pipeline.What did you expect to happen?
Thread the caller's
AbortSignalintoprocess()/CommandContext, run with per-command timeout, kill on abort, and continue or fail gracefully with a visible message.Client information
google-gemini/gemini-cli@main9c1b0a610packages/cli/src/services/prompt-processors/shellProcessor.ts:155-180!{sleep 60}custom commandLogin information
N/A — repro: prompt containing hung
!{...}+ Ctrl+C still blocks.Anything else we need to know?
Fix direction: accept
AbortSignalparam,Promise.allSettledwith timeout + abort-kill, test asserting abort terminates child and pipeline continues.