Skip to content

feat(tasks): fork tasks with existing context#3610

Draft
richardsolomou wants to merge 10 commits into
mainfrom
posthog-code/feat-task-forking
Draft

feat(tasks): fork tasks with existing context#3610
richardsolomou wants to merge 10 commits into
mainfrom
posthog-code/feat-task-forking

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

Starting a new direction from an existing task should preserve the complete conversation and workspace while allowing both tasks to continue independently. Forked local tasks also need to remain visible while the server list catches up, without adding ambiguous controls to the task header.

Closes #330
Refs #1788

Changes

  • Fork local Claude sessions through the SDK transcript-copy API and hydrate the child from flushed logs so completed assistant responses are preserved.
  • Keep optimistic fork rows until the server version arrives, with rollback cleanup when provisioning fails.
  • Put “Fork task” and “Open source task” in the sidebar right-click menu. Cloud forks still use the persisted run snapshot at a completed turn boundary.

How did you test this?

  • Ran the full core suite: 2,467 tests passed.
  • Ran the full UI suite: 1,823 tests passed, plus 7 focused Claude adapter tests.
  • Ran agent, core, UI, host-router, and desktop typechecks, Biome on changed files, the host-boundary check, and git diff --check.
  • Tried live Electron verification on an alternate CDP port, but the dev build did not expose CDP after its dependency rebuild.

Automatic notifications

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

Created with PostHog Code

Create independent local and cloud tasks from an existing run while preserving conversation and workspace state.

Closes #330

Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
@trunk-io

trunk-io Bot commented Jul 21, 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

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 1b3bed5.

Preserve fork semantics across retries and partial failures, reuse checkpoint snapshots for local workspaces, and align fork UI state with live sessions.

Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
Preserve complete Claude transcripts, retain optimistic fork rows until server reconciliation, and move fork lineage actions into the task context menu.

Generated-By: PostHog Code
Task-Id: 7e31d410-f947-4069-8832-9f40ae85705a
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.

Session forking

1 participant