Repository navigation
Description
Describe the bug
In the current DeepSWE OpenCode evaluation path, a confirmed OOM kill of the agent sandbox's user container is routed to the failure sidecar instead of becoming a scored rollout. In affected 113-task attempts, this left 112 graded rows plus one ungraded OOM task. The aggregate mean excludes that task, and require_complete=true fails, so the partial mean cannot be reported as a full 113-task result.
In one observed case, the agent had issued a Go test before its sandbox terminated with exit 137 and reason=OOMKilled. The logs identify the terminated sandbox container; they do not establish which individual process reached the memory limit. Exit 137 alone is therefore insufficient evidence for scoring.
Steps/Code to reproduce bug
- Run the DeepSWE legacy
opencode_sandboxed_agentpath on Kubernetes-backed OpenSandbox with a fixed sandbox memory limit,route_failures_to_sidecar=true, andrequire_complete=true. - During the agent command, have work inside that sandbox exceed its memory limit so the current
sandboxuser container reportsTerminated (exit=137, reason=OOMKilled)from the authenticated inspect endpoint. - Collect
rollouts.jsonl, its failure sidecar, and the aggregate. With the affected Gym pin, the OOM task appears only in the sidecar, is absent from the scored main rows, and causes the completeness check to fail.
A small synthetic Kubernetes OOM smoke and its sanitized scoring evidence are described in the linked Draft PR. No private task logs or cluster identifiers are attached to this public issue.
Expected behavior
For this DeepSWE path, if the current agent sandbox user container is confirmed OOM-killed during the agent command, retain the inspect and agent-observation evidence and emit one ordinary main rollout row for that task with reward=0, mask_sample=false, and an explicit OOM failure kind. That row should count in the aggregate denominator and require_complete; a 113-task run with no other failures should then have 113 scored rows. It should not also become a failure-sidecar row.
Do not infer this outcome from exit 137 alone, a sidecar/init-container OOM, an OOM during setup or verification, or unavailable/ambiguous inspect evidence. Those cases need their existing failure handling. This issue does not require a general sandbox-provider OOM/timeout contract or changes to execution paths that the current DeepSWE leaf does not use.
Configs
The affected evaluation uses the public DeepSWE OpenCode leaf, pins Gym e76a5c62923e4e8731bb19c55f78ffca6e4de659, and enables route_failures_to_sidecar=true and require_complete=true. Global token ID capture is disabled for this recipe.
Environment details
Kubernetes-backed OpenSandbox with a memory-limited agent user container. The public reproducer in the Draft PR uses a local k3d/K3s cluster and a 256 MiB sandbox limit; the original evaluation artifacts remain private.
Additional context
- Focused temporary fix: Draft PR #4781. Its description contains sanitized real-OOM smoke evidence, focused test results, and the pending model-backed validation gate. Evidence files are not committed.
- [just for context] Earlier broader proposal and review discussion: PR #4685. The shared provider-contract design raised there is intentionally outside the temporary fix.
- The proposed change is not retroactive: affected evaluation cells need reruns pinned to a Gym revision containing the fix before reporting a full score.
Activity