You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AgentsView can resume or fork a whole Claude session, but it cannot start from the message where the user actually wants to branch. The session detail view already exposes message ordinals, and the backend already owns resume command construction, so the missing piece is a message-point contract between the message UI and the resume handler.
This adds a Claude-only message-point fork path that accepts a session ID plus message ordinal, validates that the ordinal belongs to the local Claude session, and builds a deterministic context prefix for a new Claude run. The existing whole-session resume and fork behavior stays unchanged when no ordinal is supplied, and storage remains a data source rather than the place where fork policy lives. Embedded child-session transcripts keep their own session identity, local read-only mode falls back to a copyable command, remote read-only mode hides the action, and each generated prompt file is isolated per launch and self-cleaning when run.
The frontend adds the affordance at the message level instead of overloading the breadcrumb session menu. The focused coverage should prove whole-session preservation, unsupported-agent handling, missing-ordinal handling, and the message-level request body.
Problem:from_ordinal is treated as a slice index, but stored Claude message ordinals can be non-contiguous. A valid selected message such as ordinal 3 in [0,1,3] returns 404 and cannot be forked.
Fix: Find the message by Message.Ordinal, keep the found slice index separately, and render msgs[:idx+1]. Add a regression test with a gap in ordinals.
Summary verdict: One Medium issue needs attention; no Critical or High findings were reported.
Medium
internal/server/huma_routes_sessions.go:1029
Message-point fork commands are built with POSIX-only shell syntax ('...', <, ; rm -f -- ...). Windows builds expose this feature, but the copied fallback command will not run correctly in PowerShell/cmd. Generate platform-specific command/cleanup syntax based on runtime.GOOS, or disable/return unsupported for message-point command fallback on Windows until supported.
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
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.
AgentsView can resume or fork a whole Claude session, but it cannot start from the message where the user actually wants to branch. The session detail view already exposes message ordinals, and the backend already owns resume command construction, so the missing piece is a message-point contract between the message UI and the resume handler.
This adds a Claude-only message-point fork path that accepts a session ID plus message ordinal, validates that the ordinal belongs to the local Claude session, and builds a deterministic context prefix for a new Claude run. The existing whole-session resume and fork behavior stays unchanged when no ordinal is supplied, and storage remains a data source rather than the place where fork policy lives. Embedded child-session transcripts keep their own session identity, local read-only mode falls back to a copyable command, remote read-only mode hides the action, and each generated prompt file is isolated per launch and self-cleaning when run.
The frontend adds the affordance at the message level instead of overloading the breadcrumb session menu. The focused coverage should prove whole-session preservation, unsupported-agent handling, missing-ordinal handling, and the message-level request body.
Fixes #107