fix(cli): align non-interactive loop warning handling

This commit is contained in:
Adam Weidman
2026-03-23 11:00:04 -04:00
committed by Adam Weidman
parent 7c7150f487
commit 6795567d28
2 changed files with 1 additions and 14 deletions
+1 -1
View File
@@ -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,
);
-13
View File
@@ -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;
}