fix(server): resume working threads after graceful restart via #9167 - #446
Merged
Conversation
Tim's restartRecovery path continued every interrupted turn after any process restart. Upstream pingdotgg#9167 only continues after an opt-in in-app server update. On t3vm the Tim path recovered several Grok turns at once until they hit prompt and timeout failures. After a systemd or crash restart, threads now settle as interrupted and ask for a follow-up, matching upstream. Continue-after-update remains behind Settings → Continue threads after server updates. Made-with: Grok 4.6
patroza
marked this pull request as ready for review
September 2, 2026 15:10
In-app updates already marked continueAfterServerUpdate. systemd/deploy restarts only ran stopAll, so those turns settled as interrupted. Mark the same payload key on graceful stopAll for sessions that are actually working (resume cursor + active turn). Startup pingdotgg#9167 reconcile continues them. Crash/hard-kill still does not. Made-with: Grok 4.6
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Tim Smart auto-resume continued every interrupted turn after any restart, including Grok ACP sessions that looked idle. That recovered several t3vm Grok turns at once until they failed.
Upstream #9167 is the continuation we want: mark
continueAfterServerUpdate, thenreconcileProviderSessionscontinues with Codex promptless continuation or “Continue where you left off.”That path only marked threads during an in-app Update. A t3vm deploy /
systemctl restartis a gracefulstopAlland never wrote the marker, so those turns settled as interrupted.What
restartRecoveryclaim/continue path (live-shell Grok recovery, marker drain hacks, recovery sendTurn).stopAll, mark working sessions (resume cursor + active turn) with the same#9167payload key.#9167reconcile.stopAll).User-visible
Test plan
ProviderService.test.ts— working session getscontinueAfterServerUpdatethrough wedged stopAll; idle/stopped do not; persisted live binding with empty listSessions is markedserverRuntimeStartup.reconcile.test.ts— feat(updates): continue active threads across server restarts pingdotgg/t3code#9167 mark/continue unchangeddeploy)