Agent skill
codex-load-balancer
Pick a CODEX_HOME source and/or an auth.json credential file per tmux-workflow worker so many Codex workers can balance across multiple logins. Use with tmux-workflow when you need multi-account scaling.
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/codex-load-balancer
SKILL.md
codex-load-balancer
This skill exposes a tiny CLI (scripts/clb) that:
- chooses a
CODEX_HOMEsource directory for a worker (clb pick) - chooses an auth credential file from an AUTH_TEAM directory (
clb pick-auth)
It is designed to be called by tmux-workflow/scripts/twf when twf_use_load_balancer: true.
Configure
Edit scripts/clb_config.yaml:
sources: comma-separated list ofCODEX_HOMEtemplate directories (optional; default fallback is~/.codex)auth_team_dir: required when usingpick-auth(should contain multiple auth JSON files; names unrestricted)
pick-auth selection algorithm:
- pick the least-used auth file (usage counts persisted in
state_file) - if tied, pick randomly among the least-used
Commands
- Pick a source directory (used by
twf):bash .codex/skills/codex-load-balancer/scripts/clb pick --worker <full> --base <base>
- Pick an auth file (used by
twf):bash .codex/skills/codex-load-balancer/scripts/clb pick-auth --worker <full> --base <base>
- Inspect a whole team’s usage by driving Codex
/statusin tmux (requirestmux+codex):bash .codex/skills/codex-load-balancer/scripts/clb status /abs/path/to/AUTH_TEAM
- List configured sources:
bash .codex/skills/codex-load-balancer/scripts/clb list
- Inspect resolved config:
bash .codex/skills/codex-load-balancer/scripts/clb where
tmux-workflow integration
Enable in tmux-workflow/scripts/twf_config.yaml:
twf_use_load_balancer: true
Optional:
twf_load_balancer_cmd: "/abs/path/to/.codex/skills/codex-load-balancer/scripts/clb"- or
TWF_LOAD_BALANCER_CMD=/abs/path/to/clb
When enabled, twf will:
- call
clb pickto chooseTWF_CODEX_HOME_SRC(if you didn’t setTWF_CODEX_HOME_SRCexplicitly) - call
clb pick-authand copy the chosen file into each worker home asauth.json(overriding the syncedauth.json)
Didn't find tool you were looking for?