Summary
Let any past Claude Code session be opened/resumed in any profile, not just the profile it was created in. Today, resume only works inside the originating profile because each profile has an isolated config dir and claude --resume <id> only sees that profile's transcripts under the current cwd.
Use case: a conversation started in the personal profile should be resumable in work (different account, skills, MCPs, billing) without losing the history.
Mechanism
"Open session X in profile B" = port the transcript, then resume:
- Copy the session file
<profileA>/projects/<encoded-cwd>/<session>.jsonl into <profileB>/projects/<encoded-cwd>/ (same encoded-cwd subpath). Copy, not move — the original stays in profile A (fork semantics, non-destructive).
- Launch
claude --resume <session-id> in profile B, in the original cwd.
- The conversation continues under profile B's account, skills, MCP servers, and billing.
Do not symlink — both profiles would append to one file and corrupt it. Copy = a clean fork.
Acceptance criteria
Dependencies
Risks / open questions
- Claude Code may index sessions outside the raw
.jsonl (config history) — covered by the spike.
- Cross-account continuation: the ported conversation will be billed to and shaped by the target profile. That's the intended behavior, but call it out in the UI so it isn't surprising.
Summary
Let any past Claude Code session be opened/resumed in any profile, not just the profile it was created in. Today, resume only works inside the originating profile because each profile has an isolated config dir and
claude --resume <id>only sees that profile's transcripts under the current cwd.Use case: a conversation started in the
personalprofile should be resumable inwork(different account, skills, MCPs, billing) without losing the history.Mechanism
"Open session X in profile B" = port the transcript, then resume:
<profileA>/projects/<encoded-cwd>/<session>.jsonlinto<profileB>/projects/<encoded-cwd>/(same encoded-cwd subpath). Copy, not move — the original stays in profile A (fork semantics, non-destructive).claude --resume <session-id>in profile B, in the original cwd.Do not symlink — both profiles would append to one file and corrupt it. Copy = a clean fork.
Acceptance criteria
claude --resume <id>. Confirm whether Claude Code also requires the session to appear in that profile's~/.claude.jsonhistory or validates the recorded cwd — if so, replicate that too. Do not build UI until this is proven.ccpm session port <id> --from <A> --to <B>(nice-to-have, decide during impl).Dependencies
Risks / open questions
.jsonl(config history) — covered by the spike.