Repository navigation
Conversation
This was referenced Oct 27, 2026
adalundhe
force-pushed
the
fix/session-recovery-automatic
branch
from
October 27, 2026 21:43
5ac87ab to
4972bde
Compare
adalundhe
force-pushed
the
fix/session-recovery-automatic
branch
from
October 27, 2026 21:51
4972bde to
2eafd11
Compare
Signed-off-by: Ada Lundhe <adalundhe@lundhe.audio>
adalundhe
force-pushed
the
fix/session-recovery-automatic
branch
from
October 28, 2026 15:18
2eafd11 to
270ea5c
Compare
This comment has been minimized.
This comment has been minimized.
TestSessionWorkerLossRecovery lists tasks as soon as the second turn's model call reaches the gate, and it expected that turn to be WORKING. ADK runtimes record WORKING while their model call is already in flight. In CI, the kagent runtime's UpdateTask committed after its model call reached the gate, so the listing read SUBMITTED and the kagent and byo-adk cases failed. codex and claude record WORKING first and passed. A turn is durably accepted once its task exists and has not finished, and recovery fails SUBMITTED and WORKING tasks alike. Verified with go vet on the e2e package; the suite runs in CI. Signed-off-by: Ada Lundhe <adalundhe@lundhe.audio> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moezdil
reviewed
Oct 29, 2026
| FROM session_record i | ||
| WHERE ($1::text = '' OR i.id > $1::uuid) | ||
| AND i.state = 'RUNTIME_STATE_FAILED' AND i.operation = 'RUNTIME_OPERATION_RESUME' | ||
| AND (($3 AND i.state = 'RUNTIME_STATE_READY' AND i.operation = 'RUNTIME_OPERATION_NONE') |
Contributor
There was a problem hiding this comment.
100 sessions per minute means slow detection at scale
moezdil
reviewed
Oct 29, 2026
| <div>{automatic | ||
| ? "Automatic recovery will restore the last saved runtime state. Messages the recovered agent did not retain are marked as failed." | ||
| : "Revert to the last runtime snapshot, or start a new conversation from a saved snapshot. Recovery does not replay messages it did not retain."}</div> | ||
| {!automatic && ( |
Contributor
There was a problem hiding this comment.
failed auto recovery leaves users no revert or fork
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.
Summary
Add controller-wide
sessions.automaticRecovery, disabled by default.Opt-in scans admit recovery for confirmed crashed READY Sessions, including idle and waiting Sessions. Already admitted recoveries continue when the flag is disabled. Chat shows automatic progress without manual recovery choices.
All current workflow callers receive the policy explicitly, including the newly merged waiting-expiration test that caused the earlier combined PR's CI type-check failure.
Stack
Split requested in the review discussion.
Part 6 of 6. 35 files, +656/-165 against the immediate parent.
Parts 2–6 form a GitHub stack on
main, so CI runs on each part. A stack cannot include a fork branch, so part 2 targetsmainand also shows part 1's commit until #3255 merges. Parts 3–6 target their immediate parents for a focused diff. The stack is rebased ontomainafter #3409, which removed the public Session suspend and resume controls.Testing
On
mainafter #3409, the fulldatabase, Session, gRPC and MCP race suites pass against PostgreSQL, exceptTestSandboxTemplateCatalog, which needs envtest binaries. Full Go lint reports no issues, and E2E compiles. Node 24.13: typecheck, lint and all 696 unit tests pass. Buf rate-limited remote generation, so pinned local generators produced this part's output; they reproduce official output byte-for-byte.Live cluster E2E runs in this PR's CI.
Upstream CI runs on this PR as part of the stack on
main.🤖 Generated with Claude Code