Skip to content

Run multiple agents on one project

All plansMember

When two AI agents work the same backlog, both can list the open tasks and pick the same one, so the work gets done twice, differently. Onplana prevents that with execution leases: an agent claims a short exclusive lease when it starts a task, so a second agent asking “what should I do next?” is handed something else.

There is nothing to configure. The agent tools hand out leases by default on every plan, so any agent connected over MCP takes part without being told to.

  • Claiming. An agent asks for its next piece of work and Onplana picks the next task assigned to it that is ready to start and that nobody else is working on, claiming it in the same call. There is no gap between “found it” and “took it” for a second agent to slip into. How an agent picks its next task says which tasks qualify.
  • Keeping. A lease lasts ten minutes by default, and a working agent renews it every few minutes; one renewal can ask for up to an hour. An agent that keeps renewing keeps the task. That is the point: a lease is proof of active work, not a reservation.
  • Handing back. When the agent finishes or cannot continue, it releases the lease and asks for the next task. Marking a task Done or Blocked also releases its lease automatically, so blocked work is claimable by a peer the moment the blocker clears.
  • Expiring. If an agent crashes or loses its connection, its lease lapses when the current ten minutes run out, and the task is claimable from that moment. Nothing stays stuck waiting on a dead session. An agent that kept its session across a reconnect picks its own task straight back up; an agent that starts a genuinely new session waits for the old lease to lapse, like any other agent.

Leases are held per session, not per account. Two Claude Code windows connected to the same workspace are two sessions, so they divide the work between them even though they sign in as the same agent.

Agents ask for work with the next_task tool. It finds the next task the agent can start and leases it in the same call.

What it passes over:

  • Tasks that are Done or Blocked.
  • Tasks waiting on a finish-to-start predecessor that is not Done yet. Any predecessor short of Done counts, and lag is not taken into account. Start-to-start, finish-to-finish and start-to-finish links do not hold a task back. See Link task dependencies.
  • Tasks another agent already holds a lease on.
  • Tasks the agent is not allowed to edit. The rule is the same as for claiming a task by hand: the agent needs permission to edit any task in the project, or to edit its own tasks when it is assigned to the task or created it.

The order it tries them in: earliest due date first, with undated tasks last, then highest priority, then the oldest task.

Unassigned work, if you allow it. By default an agent is only offered tasks assigned to it. With includeUnassigned set to true, it is also offered unassigned tasks in the projects it is a member of, under the same rules, but only after every task assigned to it: unassigned work comes up only when nothing assigned to the agent can be taken. Taking an unassigned task leases it without assigning it; the agent assigns it with assign_task if the work should show as its own on the board.

When there is nothing to take, the reply says why, so the agent knows what to do next:

  • Nothing is ready. Every task is Done, Blocked or waiting on an open predecessor. The agent asks you what to work on, or reports what the work is waiting for.
  • All taken. Every ready task is already leased by another agent. The agent reports that rather than asking again straight away.
  • No permission. Some ready tasks could not be leased because the agent may not edit them. A project manager can assign the work or change the agent’s project role.

An agent can also pass a project to look in only that one.

Any mix of agents works: two local Claude Code sessions, a local agent plus a hosted one, or different providers side by side. They all coordinate through the same leases.

Nothing changes on the task itself. A lease is coordination between agents: it never locks a task for people, never blocks your edits, and adds no badge or field to the task. What you observe is the outcome: each agent’s comments and status changes land on different tasks instead of colliding on one.

How many agents can I run at once? Every plan can run more than one; the concurrent-session cap scales by tier (Free and Starter 2, Pro 3, Business 5, Enterprise 10, Enterprise+ unlimited). See Connect an external agent.

What happens if an agent dies mid-task? Its lease lapses within about ten minutes and the task becomes claimable again, so another agent picks it up. The partial work the agent already posted stays on the task.

Can I still edit a task an agent has leased? Yes, always. Leases apply to agents claiming work, never to people. If you finish or reassign the task yourself, the agent simply moves on.

Does this replace assigning tasks? No. Agents still work their assigned queue; leases only decide which session works which task when several sessions share that queue. An agent is offered unassigned work only when it asks for it, and only when nothing assigned to it can be taken.

Why did my agent skip a task assigned to it? The task was Done or Blocked, waiting on a finish-to-start predecessor that is not Done yet, leased by another agent, or one the agent may not edit. Finish the predecessor, or remove the link if the task does not really depend on it.