Repository navigation
feat(agent-runs): let helpers draw shared turns as they work - #824
Merged
Merged
Conversation
A supervised helper used to reserve min(requested, remaining - 1) turns at start. With the default request of 30 the first helper held nearly the whole budget, so a second helper was refused and a person's reply was refused while it worked, although helpers used about one turn. A helper now holds only its first two turns and draws each later turn from the shared budget as it starts, up to its own max turns, while one turn stays free for the parent to integrate. A helper that would need that turn stops with turn-cap-reached instead of getting stuck. A person's reply in a primary run no longer spends the shared budget, which matches the run's own turn count; a delegated run's reply still draws on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The team turns warning and meter value counted reserved turns as used, so one starting helper turned the budget amber. Both now follow spent turns, and the budget explanation says replies do not count and helpers draw as they work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once a helper could draw past its held start turns, nothing capped its replies: a reply does not raise a run's turn count, so a blocked helper with max turns 1 took replies from the shared budget until the parent's turn. A helper's turns, replies included, now never exceed its own max turns. A helper that cannot take another turn because it reached its own max turns or only the parent's integration turn is left ends at its cap, on a dispatch, a reply in its task or the Reply control, so its parent reads a finished child instead of waiting on a blocked one. A paused parent or a released reservation refuses the turn without ending the helper. The reply exemption copy now says it covers the main run only; replies to a helper still count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
astyfx
requested review from
heath-s and
schang124
and removed request for
a team
October 25, 2026 08:03
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
17e7ff8 < |
2026-10-25 08:03 UTC | 0 | 0 | 0 |
Last scanned: 17e7ff8 · 2026-10-25 08:03 UTC
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Team turns keep their 30 / 100 limits, but a supervised helper no longer reserves almost the whole shared budget when it starts. Helpers draw turns as they work, a person's replies in the main run no longer count, and the Team turns warning follows spent turns.
Changes
Features
TEAM_LIMITS.helperStartTurns) and draws each later turn from the shared budget as it starts, up to its own max turns, while one turn stays free for the parent to integrate. Several helpers can now work at once with the default request of 30 turns; before, the first one reservedremaining - 1and the second was refused.Fixes
turn-cap-reachedon a dispatch, a reply in its task or the Reply control, so its parent reads a finished child instead of waiting on a blocked one. A paused parent or a released reservation refuses the turn without ending the helper.Test Evidence
bun test tests/agent-run-*.test.ts tests/delegated-*.test.ts tests/adaptive-*.test.ts tests/run-team-limits-ui.test.tsx: 848 pass, 0 fail. New cases: concurrent default-request helpers, drawing past held turns, ending when only the parent's turn is left, own max turns with replies, paused parent keeps the helper, Reply control at the cap, replies in the main run spend nothing, helpers' turns halt the run and Extend continues it, warning ignores held turns.bun run typecheck,bun run lint(warnings only, in untouched files),bun run check:i18n: pass.bun run build:pages: pass.bun test: 9248 pass, 205 fail; the failures are process/timing tests (CLI probes, ACP, Lens, git scripts) that pass when rerun alone, none in the changed area. CI is the authority.Notes
🤖 Generated with Claude Code