acpmux: an adopted Claude Code chat keeps its profile (claude-sr2 comes back as claude-sr2)

Merged
TE
8d ago
+368-22

WIP: red test first; the fix follows on this branch.

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes adopted Claude Code chats keeping their profile: a claude-sr2 chat adopted as plain claude now resumes the claude-sr2 session that holds it instead of starting a second session, and adopting with an explicit claude-sr2 profile is no longer refused as an unsupported family.

  • Adopt now reads the store family (config::store_family, claude for any Claude Code profile) for the store, holder check, folder, trust gate, and replay, matching the holding session by its native id on whichever profile ran it.
  • The adopted session keeps its own harness and family.
  • Backs the fix with tests covering both recovery paths plus the trust gate, holder matching, and the chat list's open plan.