
At work, I’m running large orchestrations that exhaust the quota of a single Max or Pro subscription pretty quickly. I found myself manually switching between accounts, telling Claude to write a handoff for Codex and telling Codex to write a handoff for Claude, and doing this repeatedly.
Sometimes I’d leave a large job overnight, and it would exhaust the quota and get stuck in the middle of the night. That was frustrating. I have multiple subscriptions to switch between, and the work should be able to continue, so I made aiq.
aiq pools Claude Code and Codex accounts. PATH shims route claude, codex, and their workers, including nested launches.
For long-running orchestrations:
aiq long claude
# or
aiq long codex
The session runs under tmux. Near a quota limit, hooks ask the agent to finish the current unit of work, stop his background jobs, and write a handoff. aiq then restarts in the same pane on an account with headroom.
- Same provider: resume the full conversation on another account.
- Different provider: start a fresh session from the handoff and working tree. Claude can hand off to Codex or vice versa.
- Pool exhausted: wait for a quota reset, then continue.
Accounts share settings, plugins, and history; credentials stay separate.
Routing considers remaining quota, reset times, and worker load. Interactive launches are sticky per workspace; workers are scored per call, with concurrency caps and a weekly reserve. aiq status --explain shows the ranking.
macOS and Linux. MIT. Setup and source.