Skip to content

Accounts: several Claude Code and Codex logins per machine, with pools and failover - #50

Merged
JOsacky merged 1 commit into
mainfrom
claude/skillhook-multi-account-mgmt-15e1f8
Oct 23, 2026
Merged

JOsacky merged 1 commit into
mainfrom
claude/skillhook-multi-account-mgmt-15e1f8

Conversation

@JOsacky

@JOsacky JOsacky commented Oct 23, 2026

Copy link
Copy Markdown
Member

What

skillhook accounts: several Claude Code and Codex logins on one machine, modelled on how t3code handles multiple provider instances, plus what an unattended server needs. Guide: docs/accounts.md.

  • Accounts: its own config dir (CLAUDE_CONFIG_DIR / CODEX_HOME under ~/.skillhook/accounts/<name>; Codex links ~/.codex except auth.json, like t3code's shadow home), a claude setup-token token, or an API key. A run gets only its account's credentials.
  • Commands: accounts [list|show|usage|check|add|login|logout|default|enable|disable|reset|discover|sync|exec|remove].
  • Reporting: who each account is, plan, usage windows (5h, weekly, per model, credits), last use, 24 h jobs and cost, skills, and attention items with the fix (logged out, expired, limited, high usage, failed login, duplicate login, skill naming a missing account). Identity and usage come from the CLI itself (Claude Code control protocol initialize/get_usage/get_status, codex app-server account/read/account/rateLimits/read); skillhook never reads a token.
  • Pools: account: in a skill/hook or defaults.accounts; ordered or balanced; failover to the next account on usage_limit/auth before the agent produced output; limited accounts skipped until reset (from Claude's rate_limit_event, the CLI message, or a cooldown). Jobs record account per attempt.
  • Surfaces: GET /accounts, MCP list_accounts, health rows, account.changed / account.updated events, run --account, jobs list --account, accounts check --notify; serve checks accounts at start, with opt-in usage polling and desktop notifications (account_policy).

Not included: uploading the account events to Skillhook Cloud (they are in the protocol vocabulary but not in the link's upload set); that is a separate change.

Checks

  • pnpm run check green (typecheck, 408 tests, build, schema, release).
  • Smoke test against the real claude 2.1.305 and codex 0.163.0: an expired Claude login is reported as expired, Codex Pro usage read (weekly window).

🤖 Generated with Claude Code

…s and failover

`skillhook accounts` names logins (own config dir, `claude setup-token`
token, or API key) and reports for each who it is, plan, usage windows
(5h, weekly, per model; via Claude Code's control protocol and
`codex app-server`), last use, jobs, and what needs attention with the fix.

`account:` in a skill (or `defaults.accounts`) runs as one account or a
pool: first usable account runs, failover on usage_limit/auth before the
agent produced output, limited accounts skipped until reset. A run gets
only its account's credentials.

Also: GET /accounts, MCP list_accounts, health rows, account.changed /
account.updated events, `accounts check --notify`, opt-in desktop
notifications and usage polling in serve, expired-login detection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JOsacky
JOsacky enabled auto-merge (squash) October 23, 2026 15:32
@JOsacky
JOsacky merged commit 59f4d64 into main Oct 23, 2026
6 checks passed
@JOsacky
JOsacky deleted the claude/skillhook-multi-account-mgmt-15e1f8 branch October 23, 2026 15:33
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