Repository navigation
feat(infinity-daemon): fork a session from a user turn (non-destructive rewind) - #166
Open
akainth015 wants to merge 1 commit into
Open
akainth015 wants to merge 1 commit into
akainth015 wants to merge 1 commit into
Conversation
Deploying infinity with
|
| Latest commit: |
c426040
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5accb55c.infinity-dc7.pages.dev |
| Branch Preview URL: | https://pr-daemon-rewind.infinity-dc7.pages.dev |
akainth015
force-pushed
the
pr/daemon-interrupt
branch
from
October 19, 2026 23:51
2fe43b6 to
7920231
Compare
akainth015
force-pushed
the
pr/daemon-rewind
branch
from
October 19, 2026 23:51
dd406d1 to
1508d93
Compare
akainth015
force-pushed
the
pr/daemon-interrupt
branch
from
October 20, 2026 00:16
7920231 to
f2bdfb3
Compare
akainth015
force-pushed
the
pr/daemon-rewind
branch
from
October 20, 2026 00:16
1508d93 to
39a3427
Compare
akainth015
marked this pull request as draft
October 20, 2026 02:52
akainth015
force-pushed
the
pr/daemon-interrupt
branch
from
October 20, 2026 17:42
f2bdfb3 to
fd5f935
Compare
akainth015
force-pushed
the
pr/daemon-rewind
branch
from
October 20, 2026 17:42
39a3427 to
a8da36b
Compare
akainth015
force-pushed
the
pr/daemon-interrupt
branch
from
October 22, 2026 01:18
fd5f935 to
65776c2
Compare
akainth015
force-pushed
the
pr/daemon-rewind
branch
from
October 22, 2026 01:18
a8da36b to
3c24168
Compare
…ve rewind)
Adds `ClientMessage::ForkSession { thread_id, user_turn, keeps_session_alive }`:
create a NEW session whose history is the original's conversation just
before its `user_turn`-th user-text turn. The original session is only
read, so "rewinding" is an edit-and-fork that keeps it intact.
* `SessionManager::fork_session` resolves the turn (0-based over the
session's persisted user-text rows, matching the `UserInputEcho` entries
in its `Replay`; rows behind a compaction summary still count) and seeds
a new root thread with existing `ConversationStore` primitives: the rows
before the cut are copied verbatim 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`; clients then send the (edited) turn as
`UserInput`. Non-sessions and out-of-range turns are reported via
`DaemonMessage::Error`. `ThreadRef`s are stripped on the
remote-forwarding path.
Based directly on `main`; independent of any interrupt work.
akainth015
force-pushed
the
pr/daemon-rewind
branch
from
October 29, 2026 22:57
3c24168 to
c426040
Compare
akainth015
marked this pull request as ready for review
October 29, 2026 22:57
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
ClientMessage::ForkSession { thread_id, user_turn, keeps_session_alive }: creates a NEW session seeded with the session's history before itsuser_turn-th user-text turn. The original session is only read, never modified.CreateSession, the requesting connection is attached to the fork and receivesConnected.Error. Remote forwarding stripsThreadRefs.Uses only existing store APIs (no store-trait changes); agent-core is untouched.
Replaces #144 (same auto-merge accident as #142).