qwen-code/packages
Shaojin Wen d7d793c5bf
feat(serve): make sub-session concurrency caps configurable (#8341)
* feat(serve): make sub-session concurrency caps configurable

The per-caller (5) and workspace-total (20) ceilings on concurrent
create_sub_session sub-sessions were hardcoded, and 5 was too tight for
legitimate parallel fan-out. Both are now configurable via
serve.maxConcurrentSubSessionsPerCaller and
serve.maxConcurrentSubSessionsTotal, with defaults raised to 16 and 24.

The total default stays below the bridge's default maxSessions (32):
finished sub-sessions linger in the session table until idle-reaped, so
a total cap at the table limit would fail the next fan-out wave at
bridge admission and starve interactive sessions of slots.

Caps are a daemon-resource control, read from trust-filtered merged
settings at launcher creation (primary, secondary, and dynamic
workspaces); only positive integers are honored, anything else falls
back to the built-in defaults.

* fix(serve): clarify total-cap comment describes the default, not an invariant (#8341)

* test(serve): pin sub-session cap schema defaults to runtime constants (#8341)

* fix(serve): remove redundant optional chaining on non-optional parameter (#8341)

* fix(serve): clamp total sub-session cap to tracked-id set size (#8341)

The configurable maxConcurrentSubSessionsTotal could exceed
MAX_TRACKED_SPAWNED_SESSIONS (1024), causing the depth-1 nesting
gate's FIFO eviction to discard still-alive sub-session ids and
break the single-level nesting guarantee.

* fix(serve): surface sub-session cap fallbacks and schema ceiling (#8341)

---------

Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
2026-08-02 08:54:55 +00:00
..
acp-bridge feat(serve): resolve and report the daemon memory budget (#8245) 2026-08-02 04:19:31 +00:00
audio-capture chore(release): v0.21.3 (#8338) 2026-08-01 18:14:12 +00:00
channels fix(github-channel): recover interrupted inbound tasks (#8306) 2026-08-02 07:27:44 +00:00
chrome-extension chore(release): v0.21.3 (#8338) 2026-08-01 18:14:12 +00:00
cli feat(serve): make sub-session concurrency caps configurable (#8341) 2026-08-02 08:54:55 +00:00
core fix(core): retry leaked JSON tool protocol output (#8301) 2026-08-02 08:31:20 +00:00
cua-driver fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00
desktop feat(core): Normalize tool-call terminal telemetry (#8176) 2026-07-31 11:51:14 +00:00
desktop-shell feat(desktop): package Web Shell as a release-ready desktop app (#8132) 2026-08-02 08:20:16 +00:00
mobile-mcp chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
sdk-java fix(sdk-java): accept ERROR terminal in teardown E2E to fix flaky race (#8354) 2026-08-02 03:34:47 +00:00
sdk-python fix(sdk-python): validate max_tool_calls and max_subagent_depth as integers (#7548) 2026-07-23 08:45:13 +00:00
sdk-typescript feat(serve): resolve and report the daemon memory budget (#8245) 2026-08-02 04:19:31 +00:00
vscode-ide-companion feat(serve): make sub-session concurrency caps configurable (#8341) 2026-08-02 08:54:55 +00:00
web-shell fix(todo): preserve compatibility outside active plans (#8334) 2026-08-02 02:28:57 +00:00
web-templates chore(release): v0.21.3 (#8338) 2026-08-01 18:14:12 +00:00
webui fix(core): unblock history pagination on oversized transcript turns (#8335) 2026-08-01 18:39:05 +00:00
zed-extension