feat: share client state through --account #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/account-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A launch kept its client state, logins included, in its identity's
folder, so one identity could hold only one login per client. Using a
personal and a company Claude subscription with the same SSH key, forge
token, and goals meant two identity folders with copied files.
What changed
--account NAME, orAZKABAN_ACCOUNTin an identity'senv.<client>or
env, puts the client's state in~/.azkaban/accounts/NAME/<client>.The option wins over
env.<client>, which wins overenv; theworkspace file still cannot set it. Without an account, the identity's
own state serves as before.
must stay apart name different accounts.
launch before the engine, creating nothing.
<client>: account: <name>: state <path>after the identity line.
headless contract, and example env follow.
Out of scope: a per-account API key (a key in the identity's
envreaches every account), moving existing state, and commands to list or
delete accounts.
How to verify
claude . --account work --dry-runprints the account line onstandard error, mounts
~/.azkaban/accounts/work/claude/config, andcreates nothing.
claude . --account ../xstops withinvalid account name '../x'.make test TESTS=accountruns the new suite.On the tip,
make lint && .agents/hooks/shellcheck.sh repo && make testexits 0, with 31 test files and 0 failures.
make test-e2e, which needsreal Podman, was not run.
Considerations
Sharing an account across identities is deliberate: a hook or setting
one identity's session writes there runs in the sessions of every other
identity that names it, with that identity's credentials. Accounts and
Identities in the README say so. The symlink check on the client state
path now runs once the identity's files have loaded, so an unnamed
launch with a symlinked state path prints the workspace line before it
refuses.