Six review findings from the protocol-gap round: - A recovered auto-retry no longer terminalizes as failed. Pi emits the erroring `message_end` before retrying, and `auto_retry_end` success left that failure in place, so `agent_settled` failed the whole turn. - A failed `prompt` send finalizes the turn again. The fire-and-forget change moved the send off `request`, dropping the cleanup, so a send failure left `activeTurn` set and wedged every later turn. - `startTurn` now holds the session permit, so a new turn cannot start while the previous `finalizeTurn` is still awaiting `get_entries`. That race let the old finalizer capture the new turn's entry and publish idle after the new turn had already published active. - `switch_session` clears the model and thinking baselines too, so "Pi default"/"inherit" cannot replay the previous session's defaults. - Termination re-checks liveness before SIGTERM and before escalating to SIGKILL. Signalling a pid that already exited can hit an unrelated process once the OS recycles the pid or pgid. - Windows tears down the whole tree with `taskkill /T`, matching `AcpSessionRuntime`. `process.kill` reached only pi itself and left extension subprocesses holding inherited stdio handles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wout Stiens committed on 9/1/2026, 5:42:54 AMparent8dbf009
2 files changedLine totals unavailable