Skip to content

fix(sessions): preserve conversation across reconnects#3767

Open
richardsolomou wants to merge 1 commit into
mainfrom
posthog-code/fix-reconnect-conversation-context
Open

fix(sessions): preserve conversation across reconnects#3767
richardsolomou wants to merge 1 commit 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

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 0c1cf9c.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant