Skip to content

feat(infinity-daemon): fork a session from a user turn (non-destructive rewind) - #144

Merged
akainth015 merged 0 commit into
pr/slack-stop-interruptfrom
pr/daemon-rewind
Oct 19, 2026
Merged

akainth015 merged 0 commit into
pr/slack-stop-interruptfrom
pr/daemon-rewind

Conversation

@akainth015

@akainth015 akainth015 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Adds ClientMessage::ForkSession { thread_id, user_turn, keeps_session_alive }: creates a NEW session seeded with the original root thread's history before the user_turn-th user input. The original session is only read, never modified. Rows before the cut are copied verbatim (turn indices stay compaction-stable), and the latest compaction summary at or before the cut is carried over. The fork inherits cwd and model, and is registered last so a half-seeded fork never lists. Like CreateSession, the requesting connection is attached to the fork and receives Connected. Out-of-range turns return Error. Remote-forwarding strips ThreadRefs.

Uses only existing store APIs: no store-trait changes, and agent-core/lambda are untouched (4 files, ~160 production lines + test).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying infinity with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8eb7985
Status: ✅  Deploy successful!
Preview URL: https://e2165b27.infinity-dc7.pages.dev
Branch Preview URL: https://pr-daemon-rewind.infinity-dc7.pages.dev

View logs

@akainth015
akainth015 added this pull request to stack #149 October 16, 2026 17:01
@akainth015
akainth015 requested a review from a team October 16, 2026 17:02
@akainth015 akainth015 closed this Oct 19, 2026
@akainth015
akainth015 merged commit dd406d1 into main Oct 19, 2026
1 check was pending
@akainth015
akainth015 deleted the pr/daemon-rewind branch October 19, 2026 20:31
@akainth015 akainth015 changed the title feat(infinity-daemon): add thread rewind — discard a user turn and everything after it feat(infinity-daemon): fork a session from a user turn (non-destructive rewind) Oct 19, 2026
@akainth015
akainth015 restored the pr/daemon-rewind branch October 19, 2026 22:08
@akainth015

Copy link
Copy Markdown
Member Author

Superseded by #166 — this PR was auto-marked merged by a stack reorder (its commit became reachable from its base branch). It never reached main.

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