Updated Edit
On this page
Migrate session-keyed artifacts between Claude Code profile dirs.
#claudewheel.migrate
#claudewheel.migrate
Move session artifacts between profiles.
#MigrateResult
Counters tracking the outcome of a session migration operation.
#_resolve_symlink_target
python
def _resolve_symlink_target(p: Path) -> Path | NoneReturn the resolved target if p is a symlink, else None.
#_discover_uuids
python
def _discover_uuids(src: Path) -> set[str]Union of session UUIDs found across all five artifact dirs.
#_move_artifact
python
def _move_artifact(src: Path, dst: Path, result: MigrateResult, dry_run: bool) -> NoneMove src to dst. Refuse to overwrite (collision).
#_shared_store
python
def _shared_store(src: Path, dst: Path) -> boolTrue if src/projects and dst/projects symlink to the same target.
#migrate_sessions
python
def migrate_sessions(ws: 'Workspace', src_profile: str, dst_profile: str, uuid_filter: str | None=None, dry_run: bool=False) -> MigrateResultMigrate session artifacts from src_profile to dst_profile.
Profile names resolve through :meth:ProfileStore.path_for, so "default" (Claude Code's built-in ~/.claude) is a valid source or destination in either direction.