Note
Grok responding on behalf of Julius.
Triage
Thanks @areidyOTH for the detailed diagnosis, the code pointers, and the timing evidence. I confirmed this on main (31a9da179). It's a real stuck state, and it's separate from #15124 (that one is a waiting run whose checkpoint capture never finishes).
Why Stop, Settle, and steer fail
This matches your report. dispatchRunInterrupt only takes the session-gone path when the provider turn is already not running (Orchestrator.ts, settleOnly). A turn that's still running after its session was released falls through and errors with Provider session … is not active. thread.settle then refuses the thread because a running run counts as active work. Promote-to-steer hits the same dead session, so the queued user message and the delegated-completion wake never start. Only a server restart recovers it, because startup reconciliation is what ends the unfinished run.
Why the session was released
Also as you described. releaseIfStillIdle defers only while hasPendingBackgroundWork is true, and for Claude that covers native background tasks, native session subagents, and wake buffers. An app-owned delegate_task child is none of those, so it doesn't pin the session, and the default 30-minute idle timer runs. The gap from end_turn at 10:31:30Z to query.close at 11:01:30Z matches that timer. The session pump marks the session idle when it sees turn.terminal, which starts the timer.
One correction to the causal chain
T3 doesn't intentionally keep the run and provider turn running after that terminal. A root turn.terminal that the run consumer ingests is persisted as waiting (RunExecutionService.writeFinalRunEvents), and the provider turn leaves running. Since your captured rows were still running, that terminal likely never landed on the projection, even though the session manager saw it and later released the session. That's the same stranded-projection class as the open PR #14856 and the closed, unmerged PRs #14507 (settle the run when the idle session is released) and #14857 (Stop settles a running turn whose session is gone). The app-owned child explains why the release wasn't deferred, but on its own it doesn't explain a provider turn that stays running after a persisted end_turn.
The parent_not_active errors aren't established by this capture. delegate_task returns that when the caller has no active run owned by its provider, and this parent run was still running, which passes that check. Releasing the session revokes the MCP credential separately.
Optional extra evidence
If you still have the trace, whatever the server logged around 10:31Z when the end_turn result arrived would help narrow it down. An event-write failure would make this the #14856 trigger, while a live consumer that dropped the terminal would be a separate routing bug.
A maintainer will decide on the fix direction.