Sharing agent work across lanes and accounts
For one person running several coding agents at once: at the end each agent has one task, one lane and one account, and none starts when quota or a release says stop.
- Topics
- Skill areas
- Based on
- Updated
- ·
Before you start
-
A task queue with priorities.
-
More than one model or account, each with its own usage limit.
-
A worktree per task, created fresh from the main branch.
Steps
Define lanes with their own caps
Split the work into areas that can move in parallel, such as interface, search or data, and give each a worker cap. A global cap keeps the total in check.
Order the queue the same way every cycle
Run the dispatcher on a timer. It takes urgent tasks first, then by priority, and prefers tasks that block others. Tasks marked for a person or for triage are skipped.
Bind each run to one account
An account is eligible when it is not on hold after a limit or a sign-in failure, not resting after repeated failures, below its usage stop, and has a free slot. Store accounts only as a hash.
Rotate to the account that resets soonest
Probe the accounts on a timer and prefer the one with quota left whose weekly window resets soonest. When a reading is stale, start only one worker until it is fresh again.
Keep one writer per task
One task, one worker, one branch and one pull request for its whole life. If a pull request already names the task, the next worker continues it instead of opening another.
Rest a task that keeps failing
When a task keeps ending unresolved, it rests longer each time and is finally marked for triage.
Hold new work during a release
While a release runs, no lane starts a new worker. A failed release writes a halt that only a person clears.
When not to use this
-
One agent on one account: a queue and a branch per task are enough.
-
Tasks that touch the same files: run them in one lane, one at a time.
Where it comes from
Hintapiste.fi runs seven lanes this way from one dispatcher every five minutes, across Claude, Codex, Gemini and a local model. Two of the models are limited to three of the lanes.