fix: ccx move --session moves only that session, not whole project dir - #147
Open
zzJinux wants to merge 1 commit into
Open
fix: ccx move --session moves only that session, not whole project dir#147zzJinux wants to merge 1 commit into
zzJinux wants to merge 1 commit into
Conversation
…t dir --session <id> resolved the ID only to find its project path, then called MoveProject — the same whole-directory rename used by --from — so every sibling session under that project got dragged along and had its cwd rewritten, contradicting the "move a specific session" help text. Add MoveSession to relocate just one session's transcript (plus its subagents/scratchpad data), and route --session and the default (current tmux session) path through it. --from keeps using MoveProject since it's documented as whole-directory.
Collaborator
|
🤖 Needs human review — novel/design pattern. The PR review watcher is not auto-approving this one. |
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.
Summary
ccx move --session <id>claimed ("Move a specific session by ID") to move one session, but resolved the ID only to its project path and then calledMoveProject, the same whole-directory rename used by--from— every sibling session under that project got moved and hadcwdrewritten too.session.MoveSession(oldPath, newPath, sessionID), which relocates only that session's.jsonl(plus itssubagents/dir and scratchpad dir), rewritingcwdonly there.RunMovenow routes--sessionand the default (current tmux session) case throughMoveSession;--fromstill usesMoveProjectsince it's documented as whole-directory.Test plan
go build ./...go vet ./...go test ./...TestMoveSessionOnlyMovesOneSessionproves a sibling session stays in the old project dir untouched while the target session moves and itscwdis rewritten.