feat(cloud-agent-next): cap control-plane Kilo memory with cgroups - #6650
Merged
Merged
Conversation
Turn the memory controller on in the control wrapper, the same way the legacy path does. If the container cannot enforce the cap, start Kilo without claiming protection.
eshurakov
force-pushed
the
eshurakov/control-plane-workload-cgroups
branch
from
September 23, 2026 13:57
63bd07d to
69dec21
Compare
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental change only deletes the now-obsolete cgroup implementation plan doc; no runtime or test code changed and no new issues found. Files Reviewed (1 file)
Previous Review Summaries (2 snapshots, latest commit bd9a1a3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit bd9a1a3)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit 69dec21)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (11 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
A Kilo server born under the tool group was left there, so a tool OOM could kill it. Stats diagnostics also hid a changed tool or server count.
pandemicsyn
approved these changes
Sep 23, 2026
This was referenced Sep 24, 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.
Summary
kilo serveand the commands it starts under a cgroup memory cap, the same way the legacy wrapper turns the memory controller on.CONTROL_WORKLOAD_CGROUP=0can be passed from the worker into the container to turn the cap off. It is not set in wrangler, so the default stays on.A real Cloudflare container was not run.
Test plan
pnpm --filter @kilocode/cloud-agent-wrapper exec bun test src/control/workload-cgroup.test.ts src/control/owned-processes.test.tspnpm --filter cloud-agent-next exec vitest run src/sandbox-control/wrapper-launch-env.test.tsCONTROL_WORKLOAD_CGROUP=0on the worker reaches the container and starts Kilo without the cap