Commit Graph
1 Commits
Author SHA1 Message Date
Myles AndersonandClaude Opus 5 c3a56a5833 Fork chat turns to sample multiple responses (#206)
Retry re-samples a reply as a sibling of the one already there, and editing
a sent message re-asks it as a sibling prompt. A `‹ 2/3 ›` pager switches
between the forks of a turn.

Transcript messages become a tree: `chat_messages.parent_id` plus
`chat_sessions.active_leaf_id`, which picks the branch on screen. Harness CLIs
mint a new session id per turn, so each user message records the id its turn
started from (`base_native_session_id`) and each reply the id it ended at
(`result_native_session_id`) — re-sampling resumes from the recorded start and
branches the harness's own history instead of extending a sibling's.

A `user_version`-guarded backfill chains existing transcripts and hands each
session's newest message its live harness id, so a turn recorded before this
change keeps its conversation when forked.

Forks share the session's git worktree, so a re-sampled turn starts from
whatever files the previous one left behind.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:40:53 -07:00