Repository navigation
feat: restore and recover agent-local ACP sessions - #30857
Merged
hugodutka merged 1 commit intoOct 26, 2026
Merged
Conversation
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 15, 2026 17:31
c1cc5b0 to
553d69c
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 16, 2026 15:19
553d69c to
2788039
Compare
hugodutka
changed the base branch from
hugodutka/acp-session-runtime-tests
to
hugodutka/acp-session-watch
October 16, 2026 15:21
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 16, 2026 16:51
2788039 to
0004e7b
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 19, 2026 12:06
e8b05b1 to
a861b12
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 19, 2026 12:58
a861b12 to
755599c
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 20, 2026 15:23
755599c to
14631da
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 20, 2026 17:25
4e1c3fe to
aff2a66
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 20, 2026 17:51
aff2a66 to
8971ab5
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 20, 2026 18:35
eeece49 to
16e9a22
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 21, 2026 13:20
447152f to
20ebca1
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 21, 2026 13:36
20ebca1 to
e2cc39f
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 21, 2026 14:19
12ca7ea to
a5b2e3e
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 21, 2026 16:12
4c7177b to
4c7c646
Compare
hugodutka
marked this pull request as ready for review
October 21, 2026 16:36
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 21, 2026 16:56
4c7c646 to
cd88e18
Compare
mafredri
self-requested a review
October 22, 2026 09:44
mafredri
reviewed
Oct 22, 2026
| return nil, err | ||
| } | ||
| if s != nil { | ||
| s.Close() |
Member
There was a problem hiding this comment.
This method already mutates s in e.g. s.proc.close(), but an init error above abandons it without calling s.Close.
Collaborator
Author
There was a problem hiding this comment.
That's intentional. A session that failed won't access s.proc again, so it's safe to close. But if we fail to initialize a new session in its place then we want to retain the old session so it's still available for inspection.
It'd be clearer if we closed the process the moment it enters the Error state, so I did that now.
Collaborator
Author
There was a problem hiding this comment.
One more thing: I'm going to rename s to oldSession
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 22, 2026 20:30
cd88e18 to
275aa34
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
2 times, most recently
from
October 23, 2026 11:17
019b858 to
f792afc
Compare
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 23, 2026 11:34
f792afc to
4cae40c
Compare
mafredri
approved these changes
Oct 26, 2026
Restore absent native sessions with load or resume, preferring load for history replay. Collect replayed notifications before attachment, import initial history through the session, and publish the initialized runtime only after the handoff. Derive history completeness from the operation. Share concurrent recovery attempts, preserve failed transcripts, and retry messages only when callers resubmit them. Include restoration, recovery, and callback handoff tests alongside these behaviors.
hugodutka
force-pushed
the
hugodutka/acp-session-recovery
branch
from
October 26, 2026 16:01
4cae40c to
481f38c
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Restore missing or failed agent-local ACP sessions using load or resume, preferring load to replay the latest turn's history. Share concurrent recovery attempts and preserve failed transcripts without automatically retrying messages.
Depends on #30903.
Generated with Codex, carefully reviewed by Hugo.