Skip to content

Make the governed worktree capacity configurable per repository - #107

Merged
Yehonal merged 1 commit into
mainfrom
pr/lane-capacity-policy
Sep 24, 2026
Merged

Yehonal merged 1 commit into
mainfrom
pr/lane-capacity-policy

Conversation

@Yehonal

@Yehonal Yehonal commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

The four-lane cap on governed worktrees was hardcoded, so a repo with several agents working in parallel hit capacity reached (4) with no way to relax it short of releasing someone else's lane.

A manifest can now set:

"governed_worktree_capacity": { "limit": 4, "enforcement": "error" }
  • limit: positive integer, defaults to 4
  • enforcement: error (default, today's refusal) or warn, which opens the lane and adds the capacity message, with its stack add queue commands, to the lane warnings

Nothing changes for manifests without the key. An invalid block (non-positive limit, unknown enforcement, unknown field) is rejected at manifest load.

Expired lanes still count toward the limit on purpose: a lane lease is set once at worktree open and never renewed, so dropping expired lanes from the count would turn the cap into "4 lanes opened in the last two hours".

Bumps to 0.45.0. Full suite: 986 tests OK.

A repository can now set governed_worktree_capacity in its manifest: limit
changes the number of active lanes per clone (default 4), and enforcement
chooses between refusing worktree open (error, the default) and opening the
lane with the capacity message among its warnings (warn). Expired lanes still
count, because a lane lease is set once and never renewed.
@Yehonal
Yehonal merged commit 37ba330 into main Sep 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant