640
}
641
if (message.type === 'system' && message.subtype === 'init') {
643
>
// resume / post-rebind) so the post-materialize filter is fresh.
644
>
this._initPlugins = message.plugins ?? [];
645
>
if (!this._isResumed) {
646
>
this._isResumed = true;
647
>
}
648
>
}
649
>
const turnId = this._queue.peekParent()?.turnId;
650
const turnDuration = this._queue.peekParent()?.stopWatch.elapsed();
651
try {
652
await this._router.handle(message, turnId, turnDuration);
654
this._logService.warn(`[ClaudeSdkPipeline:${this.sessionId}] router threw, skipping: ${handlerErr}`);
655
}
657
const completed = this._queue.settleHead();
658
this._logService.info(`[Claude:${this.sessionId}] result for sdkUuid=${completed?.sdkUuid}`);