Working across multiple workspaces
Push, share, or move sessions between personal and team workspaces.
Each API key writes to exactly one workspace. Most teams hit one of three patterns when they have sessions on a laptop that need to land in different workspaces (personal, team A, team B).
Pattern A: separate per workspace
Cleanest separation. Personal sessions stay personal, team sessions stay in team. Filter the push by project so the team workspace only gets work that's actually for that team.
spooling cloud login --key sk_<team-key>
spooling push --cwd toebox --dry-run # preview which sessions match
spooling push --cwd toeboxWhen the cwd is generic (e.g. Claude Code launched from your home directory), filter by title instead:
spooling push --title islet --copy --dry-run
spooling push --title isletPattern B: share via copy
Sessions you've already pushed to one workspace can be mirrored into another without removing them from the source. The cloud rewrites session IDs deterministically so the same source session lives in both workspaces.
spooling cloud login --key sk_<team-key>
spooling push --cwd toebox --copy --dry-run
spooling push --cwd toebox --copy--copy is idempotent. Re-running it updates the same target rows, never duplicates them. The original session in the source workspace stays put.
How --copy works under the hood
The cloud rewrites each session ID before insert:
target_id = "copy_" + sha256(workspace_id + ":" + user_id + ":" + original_id)[:40]Properties of this scheme:
- The same source session in two destination workspaces gets two different
target_ids (no collision on the global PK). - The same source session pushed twice to the same destination workspace lands on the same row (idempotent).
- The original UUID is never exposed in the destination workspace, so a copy push can't be used to probe for sessions in other workspaces.
Pattern C: move (delete from old, push to new)
If sessions ended up in the wrong workspace and you want them only in the right one (no copies left behind), delete from the wrong workspace first.
# log into the workspace that currently owns the sessions
spooling cloud login --key sk_<wrong-workspace-key>
spooling cloud delete --cwd toebox --dry-run
spooling cloud delete --cwd toebox
# then log into the right one and push as usual
spooling cloud login --key sk_<right-workspace-key>
spooling push --cwd toeboxspooling cloud delete only affects the cloud copies in the workspace your current key authenticates to. Your local DB is untouched.
spooling cloud delete reference →
Two gotchas worth memorizing
The zsh line-continuation trap. Always paste the full command on a single line. zsh treats line breaks as command separators, so a wrapped spooling push \\ --cwd toebox \\ --copy will run spooling push with no flags and then fail on --cwd as a separate command.
The rejected counter. If spooling push reports rejected N: IDs already owned by another workspace, those sessions exist in a different workspace. Use --copy to mirror them, or spooling cloud delete to free the IDs and re-push.
What happens to the local DB
Across all three patterns, the local DB is never modified. Every command above is either a cloud-only operation (push, cloud delete) or a local read (sync). You can switch between workspaces and back as many times as you want without losing any local state.