Skip to content

fix: clamp template port sharing level in SubAgentAPI (#26061)#26256

Merged
f0ssel merged 2 commits into
release/2.34from
cherry-pick/26061/release/2.34
Jun 11, 2026
Merged

fix: clamp template port sharing level in SubAgentAPI (#26061)#26256
f0ssel merged 2 commits into
release/2.34from
cherry-pick/26061/release/2.34

Conversation

@jdomeracki-coder

Copy link
Copy Markdown
Contributor

Cherry-pick backport to release/2.34.

Fixes an issue where sub-agent apps created via CreateSubAgent would
bypass the check for the template's max port sharing level:

- Clamps dynamically inserted `workspace_apps` to the template max
sharing level in `coderd.agentapi.SubAgentAPI`.
- Emits a warning when clamping occurs.
- Adds unit test coverage for the max sharing level matrix.
- Adds an integration-ish test through the devcontainer sub-agent client
path.

> 🤖 Generated by Coder Agents with guidance from a human.

(cherry picked from commit 63cd8a8)
@jdomeracki-coder jdomeracki-coder added the cherry-pick/v2.34 Cherry-pick PR targeting release/2.34 label Jun 11, 2026
@f0ssel f0ssel merged commit b78ec31 into release/2.34 Jun 11, 2026
27 checks passed
@f0ssel f0ssel deleted the cherry-pick/26061/release/2.34 branch June 11, 2026 17:59
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.34 Cherry-pick PR targeting release/2.34

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants