Skip to content

Add account profiles plugin - #80326

Open
Osalumense wants to merge 1 commit into
anthropics:mainfrom
Osalumense:feature/account-profiles-plugin
Open

Add account profiles plugin#80326
Osalumense wants to merge 1 commit into
anthropics:mainfrom
Osalumense:feature/account-profiles-plugin

Conversation

@Osalumense

Copy link
Copy Markdown

Summary

Adds an experimental account-profiles plugin that manages isolated CLAUDE_CONFIG_DIR launch environments for people using personal, work, or client Claude accounts on one computer.

The plugin provides commands to create, list, inspect, launch, assign, diagnose, and safely remove named profiles. It never reads, copies, exports, or displays OAuth credentials; authentication remains entirely within Claude Code's existing /login flow.

Related to #20131. This is an interim CLI workflow, not native in-process or Claude Desktop GUI account switching.

User impact

Users can authenticate separate profiles once, launch independent Claude Code processes, and keep those processes tied to different accounts without repeatedly logging out and back in. A project-local assignment can warn when a repository is opened with the wrong profile.

Because plugins cannot mutate the parent process environment, switching requires launching a new Claude Code process. /status remains authoritative for the authenticated and billed identity.

Security

  • Validates profile names and prevents path traversal.
  • Rejects filesystem roots and home directories as profile roots.
  • Requires a managed-root marker and explicit confirmation before recursive profile removal.
  • Refuses to remove the active profile or profiles with unexpected paths.
  • Stores only non-secret profile metadata.
  • Documents OS credential-store and CLAUDE_CONFIG_DIR isolation limitations.

Validation

  • node --test plugins/account-profiles/tests/profile-manager.test.mjs — 8 tests pass.
  • claude plugin validate plugins/account-profiles — passes.
  • Windows lifecycle test: create, list, launch instructions, doctor, confirmed removal.
  • Real-account isolation test with Claude Code 2.1.197:
    • Claude Pro and Claude Team accounts remained independently authenticated in separate profile directories.
    • Alternating fresh claude auth status processes returned the correct identity for each profile without another login.
  • Marketplace and hook JSON parse successfully.
  • git diff --check passes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant