diff --git a/packages/cli/src/nonInteractiveCli.test.ts b/packages/cli/src/nonInteractiveCli.test.ts index 15b51d188c..ade6275b2a 100644 --- a/packages/cli/src/nonInteractiveCli.test.ts +++ b/packages/cli/src/nonInteractiveCli.test.ts @@ -2388,7 +2388,7 @@ describe('runNonInteractive', () => { ); }); - it('should emit warning event for loop_detected custom event in streaming JSON mode', async () => { + it('should emit warning event for loop_detected in streaming JSON mode', async () => { vi.mocked(mockConfig.getOutputFormat).mockReturnValue( OutputFormat.STREAM_JSON, ); diff --git a/packages/cli/src/nonInteractiveCli.ts b/packages/cli/src/nonInteractiveCli.ts index 557ce3577c..3eb17d507f 100644 --- a/packages/cli/src/nonInteractiveCli.ts +++ b/packages/cli/src/nonInteractiveCli.ts @@ -538,19 +538,6 @@ export async function runNonInteractive({ streamEnded = true; break; } - case 'custom': { - if (event.kind === 'loop_detected') { - if (streamFormatter) { - streamFormatter.emitEvent({ - type: JsonStreamEventType.ERROR, - timestamp: new Date().toISOString(), - severity: 'warning', - message: 'Loop detected, stopping execution', - }); - } - } - break; - } default: break; }