606
return;
607
}
609
>
// No active turn on the session. Non-action signals are silently
610
>
// dropped, but action signals can still target session-level state
611
>
// such as customizations, title, or configuration. A turnComplete
612
>
// action also drives post-turn side effects even when the matching
613
>
// turnStarted was not observed by this side-effects instance.
614
>
//
615
>
// pending_confirmation signals must also be handled here: when a
616
>
// hook-triggered continuation runs after the protocol turn has
617
>
// already completed, tool actions are dispatched (below) with an
618
>
// empty turnId. Without this, the pending_confirmation is silently
619
>
// dropped, the permission deferred never resolves, and the session
620
>
// hangs indefinitely.
621
>
if (signal.kind === 'pending_confirmation') {
622
void this._handleToolReady(signal, sessionKey, '', agent).catch(err => {
623
this._logService.error('[AgentSideEffects] _handleToolReady failed', err);