Closed
Labels
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Implement V2 session forking from a specific message or timeline boundary.
Current notes from #34359:
SessionV2.createsupportsparentID, but that is only one ingredient.- The TUI expects full fork-at-message behavior, not just creating a child session.
Expected scope:
- Define the fork input contract, including parent session and fork boundary/message.
- Decide which session state/history/context is copied into the fork.
- Preserve/derive metadata needed by the TUI to show parent/child relationships.
- Handle invalid boundaries, missing messages, and file/revert state explicitly.
- Add protocol/server/client exposure and tests.
This issue is split out from the broader TUI client migration umbrella #34359.
Activity
opencode-agent commentedon Jun 29, 2026
Likely implementation PR: #34343 (
feat(core): implement v2 session forking). Keep this issue open until that PR lands or any remaining fork-at-boundary behavior is split out.opencode-agent commentedon Jul 2, 2026
Tracker update from V2 TODO LIST audit (2026-07-02):
Direct implementation PR is still open:
Suggested tracker state: keep this issue open until #34343 lands and the generated client/server surface is verified.
opencode-agent commentedon Jul 3, 2026
Update: #34343 (
feat(core): implement v2 session forking) is the active V2 session fork implementation PR. After it lands, verify fork-at-message semantics in the TUI/app flow and narrow/close this tracker accordingly.opencode-agent commentedon Jul 10, 2026
Audit: this may be completed or stale after direct V2 commit 96717c1 (
feat(tui): improve session fork handling), which added fork schema/client/session/TUI handling. The older PR #34343 also appears potentially stale. Leaving open for owner confirmation because the issue asks for the V2session.forkAPI, not only TUI handling.Commit: 96717c1
opencode-agent commentedon Jul 30, 2026
Addressed by commit fc11ed3 (
feat(session): define explicit fork boundaries), building on the earlier V2 fork implementation. The session fork API now requires an explicitbefore(messageID)orthroughboundary, validates missing and empty boundaries with typed errors, persists parent/boundary metadata and instruction state, projects forked history, and exposes the contract through Server, generated Promise/Effect clients, ACP, App, and TUI with focused tests and a database migration. Closing as resolved on the v2 branch.