feat: set per-thread subagent limits for Codex and Claude - #66
Draft
John-Ryan21337 wants to merge 1 commit into
Draft
John-Ryan21337 wants to merge 1 commit into
John-Ryan21337 wants to merge 1 commit into
Conversation
This was referenced Sep 11, 2026
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.
An instance-wide subagent limit affects every thread that uses that provider. This adds an optional composer control for one thread, with a validated range of 1–64 and an empty-field reset to the existing provider instance policy. Related: #65.
The existing model options persist the setting for the exact environment, thread, and provider instance. It stays out of sticky defaults for unrelated chats. Active work continues; the next idle session start or resume applies the change and preserves the native continuation cursor. A session snapshot records the applied override so a reconnect can distinguish pending changes from active process settings.
This is a concurrency ceiling; it does not require the model to spawn an exact number of agents. Codex retains the existing native V1/V2 translation, and Claude uses its documented Agent-tool admission environment setting, including the existing exceptions for resumed agents and team workflows. Omission keeps the existing per-instance/native defaults. No provider dependency or adapter replacement is included.
Validation:
yarn fmt,yarn lint,yarn typecheck,yarn test --concurrency=2(4,057 passed; five existing skips), 67 browser tests across the full composer suite and focused controls, andyarn build:desktop --force. An independent implementation audit repaired draft-dialog identity and Windows environment-key casing before final checks. Tests cover bounded input, duplicate rejection, exact-instance launch options, sibling isolation, inheritance reset, persistence, failed server saves, and idle resume without interrupting active work.Before:
After:
Short interaction recording.
This draft targets current dev
99fbaec89da429924171c89d66a8f3455e42d9b0as a standalone optional adoption change.CI status for head
8b61092833fa175b7034062b9a27b68b1691a26a: Windows and macOS quality jobs passed. Ubuntu passed repository audit, formatting, lint, typecheck, unit tests, and the desktop build, then failed only the existing task-progress dock/undock browser test. A deterministic regression reproduces its retained popup state on unmodified dev; neither that component nor the existing docking test is changed by this proposal. The independent repair is PR #68, with its own regression, review, and full validation. Failing Ubuntu job. This feature branch remains unchanged.