Repository navigation
fix(grok): retire crashed sessions before deliberate resume - #923
Merged
Merged
Conversation
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: 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. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SAPHID <saphid@users.noreply.github.com> (cherry picked from commit 050cfad04f673fb092630614b8f7e82000b43ea5)
rynfar
force-pushed
the
upstream/2026-09-30-grok-crash
branch
from
September 30, 2026 15:03
c32d4b8 to
d361680
Compare
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 free
to 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.
When the Grok ACP subprocess crashed, Pylon kept its dead context registered and sent the next prompt to it. This retires the context on
ConnectionTerminated: new sends are refused immediately, any active turn settles as failed, and cleanup emits an error exit. A deliberate restart uses the saved ACP cursor throughsession/load.Cleanup runs in the adapter's owning scope under the existing thread lock. The context identity check prevents a queued teardown from touching a replacement session; the notification consumer does not wait on teardown that interrupts itself. Pylon incarnation tags and native task maps remain intact, including completed/ambiguous task identities. Graceful Stop and ordinary prompt errors keep their existing behavior. No automatic retry is introduced.
Upstream accounting
Complete three-file port of
050cfad04f673fb092630614b8f7e82000b43ea5, from the separately frozen successor bound0fcd5f90611451cca842689faea53b5450c022da, owning cycle #865. The attributed cherry-pick includes the process-crash mock and receipt-driven retry regression. Conflict resolution retains Pylon session-incarnation fields and passes the owner tosettlePromptInFlight.Pylon test adaptations scope the mock launcher/request log to disposable filesystem state, assert exactly one failed completion plus an error exit with the crashed incarnation, and assert that the resumed session has its new incarnation. The protocol log verifies one
session/newand one deliberatesession/loadusing the original cursor.Verification
hasSessionstill reports true; restored code passes. Tests wait on exit receipts, not sleeps.Model: GPT-6. Harness: Codex in Pylon.