Документация доступна только на английском языке.

Parallel agents

Run several agents on one repository without collisions — worktrees, subagents, workflows, steering and the Board — and what's still in preview.

Running agents in parallel only helps if their work doesn't collide and you can keep up with reviewing it. This page covers what Nib does today to keep parallel work apart and visible, and marks what's still coming.

What works today

One worktree per writer

A worktree is a second checkout of your repository on its own branch. Changes in one worktree don't touch your working copy or any other worktree, so agents in separate worktrees can edit the same files without stepping on each other.

  • Sessions can run in their own worktree. Start one in a worktree whenever you want a second agent working on the same repository as the first.
  • Race lanes always get one worktree each in a git repository. See Race.
  • Subagents that write get one in a session you follow, where they run in the background. Elsewhere they can ask for one with isolation: worktree in their definition. The worktree is cut from the parent session's branch.
  • Read-only subagents (exploring, searching, reviewing) share the parent's folder, which keeps them fast.

Where worktrees go. A session that runs in its own worktree gets it inside the repository by default, at <repo>/.nib/worktrees/<branch>. The folder is listed in the repository's .git/info/exclude, so it never shows as untracked. To keep worktrees somewhere else, set git.worktreeLocation to an absolute folder, for all projects or for one. Each repository then gets its own subfolder there, named after the repository's folder. The folder is created if it's missing. A folder that can't be used (the app's data folder, your home folder itself, a credential store) is ignored, with a warning in the log, and the worktree goes in the repository. The setting applies to sessions created after you change it.

Within a single folder, Nib keeps one writer: the main session edits the workspace, and helpers that need to write get their own worktree.

Subagents and workflows

A session can hand work to subagents, and run several at once. Each works in its own context and reports back a result, so the parent's context isn't filled with everything the subagent read.

For larger fan-outs, the agent can write a workflow: a short script that starts agents in parallel or in a pipeline, with a fixed shape you can read before it runs. Starting a workflow is a mutating action: it asks for permission in the default and acceptEdits modes, the classifier decides in auto mode, and plan mode doesn't allow it. A script from a folder you haven't trusted is the exception: it needs you in every mode but bypass, auto mode included. Saved workflows are picked up from .nib/workflows/ and ~/.nib/workflows/ (and the .claude equivalents). Turn workflows off with "disableWorkflows": true in settings or NIB_DISABLE_WORKFLOWS=1.

Steering a running agent

You don't have to wait for an agent to finish to change its course.

  • Return while a session is working sends your message into the running turn. The agent reads it at its next step, between tool calls, and adjusts.
  • ⌘↵ (Ctrl+Enter) queues it for after the turn instead. Queued messages wait above the composer, where you can edit or remove them, and they're sent in order when the session is free.
  • ⌥⌘↵ (Ctrl+Alt+Enter) sends it into a copy of the session, and this one carries on.
  • Interrupt with Esc to stop the turn outright.

Agents can also message each other. A message from another agent arrives as information, never as an instruction from you, and can't grant permissions. A message waits for you, as a card with Let through and Decline, when it is for a session running with more autonomy than the one that sent it; when a crew member or a scheduled run, which nobody is watching, writes to a session outside its crew that would ask you; when it comes from another device and the session runs with more autonomy than the default; and when agents have taken more automatic steps than the limit without you (8 by default). Always let through lets one sender in from then on, except messages from another device or ones held by that limit.

The Board

The Board (in the sidebar) shows every session as a card in one of five columns:

ColumnSessions that are
WorkingRunning a turn
Needs youWaiting for a permission, an answer or a plan approval
Ready for reviewFinished with changes you haven't looked at
DoneFinished
FailedStopped with an error

When more than five sessions are working at once, the Board points out that review is now the bottleneck. That's the moment to clear the inbox and the Ready for review column before starting more.

Coordination

Running agents share a few things through the daemon:

FeatureWhat it does
Shared rate limitsOne gate shares each provider's rate limit across every running agent, lowers concurrency on 429s and when responses slow down, raises it again as calls succeed, and after a 429 waits for its retry-after (or a backoff when it has none), so parallel agents don't trigger waves of 429s. Local models aren't gated
File leasesWriters announce which files they're editing on a shared board, so overlapping work is flagged before it conflicts. Runs that overlap and don't agree show in the inbox as Overlapping runs
Merge queueLanded work (a run, a race winner, a crew member's change) goes in one change at a time: rebase onto the base branch, run your checks, resolve conflicts with an agent, then merge. Failures go to the inbox
Mission controlA live tree of every running session, subagent, workflow and race lane, with what each touches and costs, and steer, pause, stop and re-budget for any branch of it. Open it from the command menu

Tips

  • Give each parallel agent a clearly separate task. Parallel work pays off for independent changes; it rarely helps when every agent needs the same files.
  • Use read-only subagents freely for exploration. They're cheap and don't need worktrees.
  • Watch your budgets. Four agents spend four times as fast.

На этой странице