fix(sandbox): raise agentweaver-exec memory limit 2Gi→4Gi to prevent preview server OOM - #931
Merged
Merged
Conversation
Squad state externalized to %APPDATA%\squad\projects\agentweaver\. .squad/config.json is now machine-local and should not be committed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 11857092-1327-41bd-8708-b2ca85e674dd
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 11857092-1327-41bd-8708-b2ca85e674dd
squad.agent.md upgraded to v0.12.0 Squad workflows upgraded (5 files) Skills moved from .copilot/skills/ to .github/skills/ squad_state MCP server pinned to 0.12.0 Squad state externalized to %APPDATA%\squad\projects\agentweaver\ .squad/config.json gitignored (machine-local external state marker) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 11857092-1327-41bd-8708-b2ca85e674dd
sabbour
force-pushed
the
fix/930-sandbox-exec-oom-memory-limit
branch
2 times, most recently
from
August 25, 2026 21:48
152f3d7 to
da981a5
Compare
…preview server OOM When an agent runs start_preview, the Node.js/Vite preview server runs inside agentweaver-exec alongside the agent process. The combined memory footprint regularly exceeds the 2Gi container limit, OOM-killing the preview server (exit 137) before the agent can register the preview URL. The existing comment already noted that Node/Next needs a 4Gi budget; the limit was simply never raised. Increasing to 4Gi matches the intent. Pod-level scheduling density drops from ~3 pods/katapool node to ~2, but the node's 16Gi real memory is still not exceeded (2x6Gi=12Gi). Closes #930 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7762866f-fa88-4087-b5df-17f482d36ec0
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.
Problem
When an agent runs
start_preview, the Node.js/Vite preview server runs insideagentweaver-execalongside the agent process. The combined memory footprint exceeds the 2Gi container limit and the kernel OOM-kills the preview server (exit 137).Reproducer: orchestration 7a0bc933-6f7a-4aaa-b7a3-0a6c4b33d12c — agent Bryant tasked with building a Trailhead Travel Studio landing page; preview never registered; beat 2.5 (approval gate) never fired.
Fix
Raise
agentweaver-execcontainer resources ink8s/base/sandbox-template-agenthost.yaml:The existing comment on the file already said 'Node/Next already needs the container's 4Gi memory budget' — the limit was simply never raised to match.
Trade-off
Pod-level scheduling density on katapool nodes drops from ~3 pods/node to ~2 pods/node (2×6Gi=12Gi ≤ 16Gi real). This is acceptable: a pool that fits 3 agents but OOM-kills their preview servers provides effectively less throughput than one that reliably runs 2.
Verification
kubectl applywith new manifest succeeds (dry-run)kubectl get pod -n agentweaver -l app=agentweaver-agent-host -o jsonpath='{.items[0].spec.containers[?(@.name=="agentweaver-exec")].resources}'Closes #930