Repository navigation
fix(server): restarts no longer stall on old subagent result deliveries - #19631
Conversation
Recovery finalized every terminal run whose input was ever a delegated delivery. Each call reloaded the parent thread and returned early. A parent with 190 past deliveries held startup for about 66 s. Recovery now finalizes only runs that consumed a cohort's current delivery message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused, well-tested server recovery fix that removes redundant historical thread reloads while preserving current delegated-delivery settlement. The only production impact is improved startup recovery performance; the companion changes are test-only. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
## What's Changed * fix(server): only Claude progress updates before a tool call show as text by @maria-rcks in pingdotgg/t3code#18923 * fix(pr): keep known state in sync across controls by @maria-rcks in pingdotgg/t3code#18408 * fix(web): review summary only says optional when it is by @flamboh in pingdotgg/t3code#18451 * fix(web): subagent lists in the composer banner no longer start lines with a comma by @flamboh in pingdotgg/t3code#19170 * fix(web,mobile): pull request filters no longer offer the Scratch folder by @flamboh in pingdotgg/t3code#19179 * fix(web,mobile): pull request project filter follows the sidebar order by @flamboh in pingdotgg/t3code#19180 * feat(settings): inactivity auto-settle can keep threads with a PR by @tris203 in pingdotgg/t3code#14642 * fix(server): Claude works next to an enterprise managed-mcp.json by @SunkenInTime in pingdotgg/t3code#18706 * fix(web,mobile): muse code uses meta's official blue logo by @maria-rcks in pingdotgg/t3code#19562 * fix(desktop): import CA trust variables from the login shell by @maria-rcks in pingdotgg/t3code#19604 * fix(server): preview copy only forwards text from the viewer's copy keys by @maria-rcks in pingdotgg/t3code#19561 * fix(muse): Supervised threads ask before commands again by @maria-rcks in pingdotgg/t3code#19558 * fix(server): restarts no longer stall on old subagent result deliveries by @t3dotgg in pingdotgg/t3code#19631 * fix(clients): a thread comes back when its subagent needs approval by @t3dotgg in pingdotgg/t3code#19630 * fix(usage): cold usage scans no longer stall the server by @t3dotgg in pingdotgg/t3code#19446 * fix(server): "Always allow this session" stops Codex asking for every command by @t3dotgg in pingdotgg/t3code#19635 * fix(web): keep vertical cursor stops outside styled markers by @Yash-Singh1 in pingdotgg/t3code#19651 * fix(web): mermaid code toggle stays in place when switching views by @maria-rcks in pingdotgg/t3code#19601 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261014.3118...v0.0.46-nightly.20261014.3132 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261014.3132
## What's Changed * fix(server): only Claude progress updates before a tool call show as text by @maria-rcks in pingdotgg/t3code#18923 * fix(pr): keep known state in sync across controls by @maria-rcks in pingdotgg/t3code#18408 * fix(web): review summary only says optional when it is by @flamboh in pingdotgg/t3code#18451 * fix(web): subagent lists in the composer banner no longer start lines with a comma by @flamboh in pingdotgg/t3code#19170 * fix(web,mobile): pull request filters no longer offer the Scratch folder by @flamboh in pingdotgg/t3code#19179 * fix(web,mobile): pull request project filter follows the sidebar order by @flamboh in pingdotgg/t3code#19180 * feat(settings): inactivity auto-settle can keep threads with a PR by @tris203 in pingdotgg/t3code#14642 * fix(server): Claude works next to an enterprise managed-mcp.json by @SunkenInTime in pingdotgg/t3code#18706 * fix(web,mobile): muse code uses meta's official blue logo by @maria-rcks in pingdotgg/t3code#19562 * fix(desktop): import CA trust variables from the login shell by @maria-rcks in pingdotgg/t3code#19604 * fix(server): preview copy only forwards text from the viewer's copy keys by @maria-rcks in pingdotgg/t3code#19561 * fix(muse): Supervised threads ask before commands again by @maria-rcks in pingdotgg/t3code#19558 * fix(server): restarts no longer stall on old subagent result deliveries by @t3dotgg in pingdotgg/t3code#19631 * fix(clients): a thread comes back when its subagent needs approval by @t3dotgg in pingdotgg/t3code#19630 * fix(usage): cold usage scans no longer stall the server by @t3dotgg in pingdotgg/t3code#19446 * fix(server): "Always allow this session" stops Codex asking for every command by @t3dotgg in pingdotgg/t3code#19635 * fix(web): keep vertical cursor stops outside styled markers by @Yash-Singh1 in pingdotgg/t3code#19651 * fix(web): mermaid code toggle stays in place when switching views by @maria-rcks in pingdotgg/t3code#19601 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261014.3118...v0.0.46-nightly.20261014.3132 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261014.3132
…es (pingdotgg#19631) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 22af947)
After an "Update everything", one fleet host took 78 s to become ready. 70 s of that was delegated-task recovery at startup. Startup holds the effect worker until recovery ends, so agents could not resume during that time.
Recovery finalized every terminal run in a parent thread whose message had ever been a delegated delivery. Each call reloaded the thread's runs, messages, subagents, and turn-item positions, then returned without writing. Only the run that holds a cohort's current delivery message can settle anything. On that host, one parent had 190 past deliveries, which caused 188 serial reloads (about 66 s, no writes).
Recovery now reads only the thread's runs. It finalizes only terminal runs whose input is a cohort's current delivery message.
finalizeDelegatedCompletionDeliveryalready ignored every other run, so delivery behavior does not change. Startup spans now also record the recovery candidate counts.Proof
Not in this PR: the time before the new process starts (likely the full DB backup on ext4, see #18633), and the slow restart continuations after ready, which wait on the SQLite connection behind background sweeps.
Reviewed with sol-loop: 1 round with GPT-6.1-Sol on high.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code