🚀 Announcing Agent Sandbox v1.0.8!
We're excited to announce the release of Agent Sandbox v1.0.8! Highlights: opt-in recovery from failed Pods, creation-latency metrics for directly created Sandboxes, GKE Pod Snapshot primitives for RL workloads, Go SDK provisioning parity with the Python SDK, bounded MCP command output, and hardened sandbox-router deployment credentials.
⚠️ Action Required
- MCP
execute_commandoutput is now bounded (#1978): Combined stdout and stderr are capped at 30,000 Unicode code points by default. Output over the budget comes back as head-and-tail excerpts separated by[... N characters omitted ...]markers. The newmax_output_charsparameter accepts 128–300,000. Responses include four new required fields:stdout_total_chars,stderr_total_chars,stdout_truncated, andstderr_truncated. The new default takes effect immediately, with no deprecation period.- Action: Set
max_output_charsif you need longer output, or redirect verbose output to a file and read it separately. MCP clients that validate response schemas strictly must accept the new fields.
- Action: Set
- Sandbox router manifests are now a Kustomization (#1499):
sandbox-router/deploy/now contains akustomization.yaml, sokubectl apply -f sandbox-router/deploy/fails. The default install no longer includesrbac-tokenreview.yaml. The router's API token is now a projected token that expires after one hour (previously up to one year on clusters with token expiration extension enabled).- Action: Install with
kubectl apply -k sandbox-router/deploy/. If you run--authz-mode=tokenreview, applyrbac-tokenreview.yamlseparately. Otherwise, delete thesandbox-router-auth-delegatorClusterRoleBinding left behind by earlier installs;kubectl applydoes not remove it.
- Action: Install with
Highlights
Core Controller
- Opt-in recovery from Failed Pods (#1192): New
spec.failedPodPolicyonSandboxandSandboxTemplate. The default,Retain, keeps today's behavior: the Failed Pod stays and the Sandbox reportsFinished=True. WithRecreate, the controller deletes its Failed Pod and creates a replacement, keeping the Sandbox identity and Sandbox-owned PVCs. Repeated failures back off exponentially from 5s to 5m. The backoff resets after the replacement Pod has beenRunningfor 10 minutes. Backoff state is in memory and resets on controller restart. - Creation latency for direct Sandboxes (#1076): The core
SandboxReconcilernow recordsagent_sandbox_creation_latency_ms, so Sandboxes created without aSandboxClaimget latency samples too. Labels are unchanged. For warm-pool Sandboxes, the sample is now recorded when the pool member becomes Ready, not when a claim adopts it. Sandboxes that exist when the controller starts are skipped, so a restart or leader failover can miss samples for Sandboxes that were still starting. - Ready message names the failing container (#2000): When a container can't start (
ErrImagePull,ImagePullBackOff,CreateContainerConfigError,CrashLoopBackOff), theReadycondition message now names it. Condition reasons are unchanged. - API docs (#1976): Documented when
podTemplateedits take effect, and that PVCs survive suspension and expiration.
SDKs
- Go SDK provisioning parity (#1876): Added
PodLabels,PodAnnotations,VolumeClaimTemplates, a fixedClaimNamewith opt-inAdoptExisting, and per-callCreateOptions onClient.CreateSandbox(includingWithShutdownAfterandWithSandboxReadyTimeout). A failedOpenandEnableAutoCleanupnever delete a claim you named explicitly.NewandNewClientnow copyLabels,Env, and the new map and slice options, so changing your maps after construction no longer affects later claims. - TypeScript SDK (#1942, #1948): New
sandboxd.authTokensends a bearer token on every REST request and gRPC call tosandboxd. The TypeScript SDK README is now published on the docs site. - Python SDK:
- Fixed sync
kubectl port-forwardtunnels (the defaultSandboxClient()tunnel andSandboxdPodTunnelStrategy) hanging after about 2,180 connections because kubectl's stdout was never read (#1950). - Package code now passes mypy
strictmode, and the newAdditionalPodMetadatamodel types thepod_metadataargument (#1951).get_sandbox_claim_warmpool_namenow raisesSandboxMetadataErrorwhenspec.warmPoolRef.nameis missing, where it used to returnNone. - Excluded the broken
kubernetes==36.0.0(#1968) and stopped leaving temporary certificate files behind at exit (#1973).
- Fixed sync
Reinforcement Learning
- GKE Pod Snapshot primitives in
examples/agent-sandbox-rl(#1540): WithClusterConfig(snapshots=True),SandboxHandleandSandboxFleetexposesnapshot,suspend,resume,restore, and snapshot cleanup. An RL loop can park a sandbox between turns and bring back its exact memory and filesystem state, or roll an episode back to a checkpoint. Requires GKE Pod Snapshot CRDs and a gVisor runtime class. Nothing changes if the flag is unset.
Sandbox Router
- Deployment identity hardening (#1499): Turned off ServiceAccount token automounting; the router now gets a projected one-hour token. Added a scoped-token v2 Kustomize overlay in
sandbox-router/examples/scoped-token-v2/, with a runbook for rotating verification keys (readers first). See Action Required above. - TLS for
/metrics(#1943): New--metrics-secure-servingflag serves/metricsover TLS with the proxy's certificate and TLS settings. It works with or without--https-bind-address.
Examples
- Claude Code (#1999): New
examples/claude-code-sandboxshows headless Claude Code driven by the Python SDK: one-shot runs, session resume backed by PVCs, and API keys injected from a Secret. - PodDisruptionBudget example (#2012): The manual PDB example now uses an integer
minAvailable. The oldmaxUnavailable: 0version only blocked evictions because PDB sync failed (Sandboxhas no/scalesubresource). Idle warm-pool Pods are no longer protected. - Faster cross-arch builds for
sandboxed-tools(#2018): Thegeminicli-toolboxbuilder stage now runs on the build host's architecture instead of under emulation.
Testing, CI & Tooling
- WarmPool capacity-cliff load tests (#1923): ClusterLoader2 scenarios for one growing pool and for many pools sharing a template with
Recreaterollouts, with convergence checks. - gVisor periodic E2E (#2002): A daily job installs gVisor (
runsc) on KIND and runs theTestRuntimeClass*E2E tests. - E2E on remote clusters (#1933, #1940): The E2E suite treats any node with a cloud provider ID as a real cluster and no longer hangs waiting for Chrome readiness on remote clusters. One E2E test moved to a unit test (#1958).
- Stress tests and Metrics Explorer: The Metrics Explorer now streams and indexes multi-GB metrics logs incrementally (#1955). Also: fixed control-plane node classification on AWS (#1954), exported root
cgroup.stat(live and dying cgroups) through node-exporter (#1970), and collected containerd CNI and pod sandbox timings (#1972). - Tooling: Helm chart linting with
chart-testingviamake lint-helm(#1464),golangci-lintv2.15.0 (#2001), Node.js >= 22 required before using the system npm (#1952), and stale PRs are now marked after 15 days of inactivity (#1947).
Installation
Standard Install (Core + Extensions)
Recommended for most users and GitOps engines (Argo CD, Config Sync, kustomize):
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v1.0.8/sandbox-with-extensions.yamlSelective Install
Install components separately:
# Core only:
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v1.0.8/sandbox.yaml
# Extensions (opt-in):
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v1.0.8/extensions.yamlPython SDK
pip install k8s-agent-sandbox==1.0.8Contributors
We extend our sincere thanks to all contributors to this release:
@BootstrapperSBL, @LinghaoLiOfficial, @Quiyyy, @RachelWanggg, @YoungJinJung, @abhayjoshi201, @aditya-shantanu, @aegeiger, @app/dependabot, @dongjiang1989, @ericcurtin, @esposem, @git-jxj, @hakman, @hyperb1iss, @janetkuo, @justinsb, @leomcl, @tomergee, @vvoronko
New Contributors
- @hakman made their first contribution in #1940
- @LinghaoLiOfficial made their first contribution in #1971
- @BootstrapperSBL made their first contribution in #1951
Full Changelog: v1.0.7...v1.0.8