Skip to content
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 into
mainfrom
posthog-code/fix-reconnect-conversation-context
Jul 24, 2026
Merged

fix(sessions): preserve conversation across reconnects#3767
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/fix-reconnect-conversation-context

Conversation

@richardsolomou

Copy link
Copy Markdown
Member

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?

  • Ran 45 workspace-server agent tests.
  • Ran 64 Claude JSONL hydration tests.
  • Ran Agent and workspace-server typechecks, the Agent build, Biome, and diff checks.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

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
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

😎 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.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit dfc24e6.

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(sessions): preserve conversation acr..." | Re-trigger Greptile

@richardsolomou
richardsolomou requested a review from a team July 24, 2026 12:15
@trunk-io
trunk-io Bot merged commit f4fb079 into main Jul 24, 2026
33 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-reconnect-conversation-context branch July 24, 2026 12:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants