You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple Claude Code accounts: an account per Directory, and usage bars per account
#468
I searched issues, PRs and Discussions first. The closest thing is #385 (a single CLAUDE_CONFIG_DIR override in Settings); I found nothing about using more than one login at once.
Problem
I use two Claude Code logins, each in its own config directory (CLAUDE_CONFIG_DIR), one per project. Pixel Agents assumes a single login at ~/.claude, so:
Launching from the + drawer always runs under whatever the server's environment says, and the transcript is only looked for under ~/.claude/projects.
The usage bars have one slot, so whichever login drew its status line last overwrites the other.
Proposed solution
Make "account" a small first-class idea: a named Claude Code config directory.
Accounts are listed in ~/.pixel-agents/config.json (id, name, configDir). With none listed, nothing changes.
A Directory can name an account. Its launches run under that login, its conversations are that login's, and a resumed conversation goes back to the account its transcript is filed under.
Usage bars are per account. The status line bridge adds its CLAUDE_CONFIG_DIR to the report, and the office draws one labelled pair of bars per account.
Discovery (Watch All Sessions, directory suggestions, team configs) covers every account's directory.
One thing I learned on the way that may matter to #385 too: Claude Code treats CLAUDE_CONFIG_DIR=~/.claude as a different login from the variable being unset (it names the keychain entry after the variable), so the default directory has to be reached by unsetting the variable, not by setting it.
How important is this to me
Would improve my workflow.
Alternatives considered
A claude shim on PATH that picks the config directory from the working directory, plus a symlink so transcripts are found. It works for launching but does nothing for the usage bars.
It touches core/ (CONTRIBUTING asks to raise that here before a PR), additively: an optional configDir on getSessionDirs / buildLaunchCommand, an optional unsetEnv on the launch command, and reportConfigDir / defaultConfigDir on UsageBridge. Lint, type checks, unit tests and the standalone e2e suite pass. I have not run the VS Code e2e specs or tested in the Extension Development Host, and I have not added e2e specs for it yet.
Known gaps: accounts are only editable in config.json (no UI to add one), and hooks and the usage bridge are still installed only into ~/.claude/settings.json.
Questions
Is this something you would want upstream, and does the "account = named config directory" shape fit where the provider interface is going?
If yes, would you prefer one PR, or split (per-account usage bars first, then the per-Directory account)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I searched issues, PRs and Discussions first. The closest thing is #385 (a single
CLAUDE_CONFIG_DIRoverride in Settings); I found nothing about using more than one login at once.Problem
I use two Claude Code logins, each in its own config directory (
CLAUDE_CONFIG_DIR), one per project. Pixel Agents assumes a single login at~/.claude, so:~/.claude/projects.Proposed solution
Make "account" a small first-class idea: a named Claude Code config directory.
~/.pixel-agents/config.json(id,name,configDir). With none listed, nothing changes.CLAUDE_CONFIG_DIRto the report, and the office draws one labelled pair of bars per account.One thing I learned on the way that may matter to #385 too: Claude Code treats
CLAUDE_CONFIG_DIR=~/.claudeas a different login from the variable being unset (it names the keychain entry after the variable), so the default directory has to be reached by unsetting the variable, not by setting it.How important is this to me
Would improve my workflow.
Alternatives considered
claudeshim onPATHthat picks the config directory from the working directory, plus a symlink so transcripts are found. It works for launching but does nothing for the usage bars.Working implementation
I have this running on a fork, as one commit on top of v1.6.0:
main: main...tomasshaw:pixel-agents:feat/accountsIt touches
core/(CONTRIBUTING asks to raise that here before a PR), additively: an optionalconfigDirongetSessionDirs/buildLaunchCommand, an optionalunsetEnvon the launch command, andreportConfigDir/defaultConfigDironUsageBridge. Lint, type checks, unit tests and the standalone e2e suite pass. I have not run the VS Code e2e specs or tested in the Extension Development Host, and I have not added e2e specs for it yet.Known gaps: accounts are only editable in
config.json(no UI to add one), and hooks and the usage bridge are still installed only into~/.claude/settings.json.Questions
The implementation was written with Claude Code, and went through a separate automated code review before I posted this.
All reactions