Skip to content

fix: ccx move --session moves only that session, not whole project dir - #147

Open
zzJinux wants to merge 1 commit into
masterfrom
edgar/fix-ccx-move
Open

fix: ccx move --session moves only that session, not whole project dir#147
zzJinux wants to merge 1 commit into
masterfrom
edgar/fix-ccx-move

Conversation

@zzJinux

@zzJinux zzJinux commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

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 called MoveProject, the same whole-directory rename used by --from — every sibling session under that project got moved and had cwd rewritten too.
  • Added session.MoveSession(oldPath, newPath, sessionID), which relocates only that session's .jsonl (plus its subagents/ dir and scratchpad dir), rewriting cwd only there.
  • RunMove now routes --session and the default (current tmux session) case through MoveSession; --from still uses MoveProject since it's documented as whole-directory.

Test plan

  • go build ./...
  • go vet ./...
  • go test ./...
  • New test TestMoveSessionOnlyMovesOneSession proves a sibling session stays in the old project dir untouched while the target session moves and its cwd is rewritten.

…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.
@zzJinux zzJinux self-assigned this Jul 29, 2026
@zzJinux
zzJinux requested a review from gavin-jeong July 30, 2026 04:14
@gavin-jeong gavin-jeong added the auto-review/needs-human Auto-review deferred to a human reviewer label Jul 30, 2026
@gavin-jeong

Copy link
Copy Markdown
Collaborator

🤖 Needs human review — novel/design pattern. The PR review watcher is not auto-approving this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-review/needs-human Auto-review deferred to a human reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants