This repository was archived by the owner on Aug 6, 2026. It is now read-only.
fix(sessions): preserve conversation across reconnects - #3767
Merged
trunk-io[bot] merged 2 commits intoJul 24, 2026
Conversation
Restore persisted history when native agent sessions cannot resume and keep recovered context available across transient prompt failures. Generated-By: PostHog Code Task-Id: 3445040d-6c46-4768-af8e-3d524fdb42df
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(sessions): preserve conversation acr..." | Re-trigger Greptile |
tatoalo
approved these changes
Jul 24, 2026
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.
Problem
Local and worktree tasks could reconnect with a fresh native agent session while the UI still showed the previous transcript. The replacement agent received none of that history, so it appeared to forget the conversation.
Changes
I restore persisted conversation history when native resume is unavailable, preserve it across transient prompt failures, and avoid resending history after a successful native resume. Claude hydration now returns the selected conversation so the fallback can reuse it without downloading the logs twice.
How did you test this?
Automatic notifications
Created with PostHog Code