Skip to content

Fork saved sessions before a retained turn - #87

Merged
he-yufeng merged 1 commit into
mainfrom
feat/offline-session-fork-20261126
Nov 26, 2026
Merged

he-yufeng merged 1 commit into
mainfrom
feat/offline-session-fork-20261126

Conversation

@he-yufeng

@he-yufeng he-yufeng commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

corecoder --fork-session ID --before-turn 3 makes a new archive from the messages before the third retained user prompt. Use --inspect-session to see the turn count and --resume to open the new ID. This lets you try a prompt again without carrying the first attempt along.

The fork copies saved messages, including earlier tool exchanges, without replaying anything or touching the working tree. The compaction summary stays in the prefix but does not count as a turn. The original archive is unchanged, and a generated name cannot overwrite another archive.

The offline CLI and file handling passed 95 focused tests locally, and the new session was read back in a separate CLI process with networking disabled. The wheel check now exercises the same fork with the installed console entry point.

Closes #88.

@he-yufeng
he-yufeng merged commit 19cd2c9 into main Nov 26, 2026
14 checks passed
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.

Fork a saved session before a chosen prompt

1 participant