Skip to content

feat: set per-thread subagent limits for Codex and Claude - #66

Draft
John-Ryan21337 wants to merge 1 commit into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-thread-fanout-20260911
Draft

John-Ryan21337 wants to merge 1 commit into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-thread-fanout-20260911

Conversation

@John-Ryan21337

@John-Ryan21337 John-Ryan21337 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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, and yarn 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:

Composer before

After:

Composer after

Thread limit dialog

Short interaction recording.

This draft targets current dev 99fbaec89da429924171c89d66a8f3455e42d9b0 as 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant