Description
Summary
Tale admits sandbox work per session, but the load comes from runs. A run that a project editor starts for a project agent joins that agent's standing session, from any door: manual start, status move, @mention or auto-retry. Joining a session that is already active is never counted, and only automated and delegated starts refuse a busy agent. So any number of Claude Code processes can share one 4 GiB / 2 CPU session container. Nothing at admission looks at host memory or CPU. When a run dies of the resulting pressure, it is retried immediately, into the same saturated session.
This happened on a production deployment on a 4 vCPU / 16 GB host. The result was 13 concurrent runs in 6 sessions, 43 OOM kills (one of them host-wide), a platform stall of about 4 h 45 min (database pool timeouts, 503s on agent-run requests) and about 64 run-hours spent on runs that failed. The sandbox quota (maxSessionsPerOrg: 6, SANDBOX_MAX_SESSIONS=8) was never exceeded.
What happened
This covers one day on a production deployment. The host had 4 vCPU, 15.6 GiB RAM and 4 GiB swap. Settings: the default agent profile (4 GiB memory, no container swap, 2 CPUs), maxSessionsPerOrg: 6, SANDBOX_MAX_SESSIONS=8, worker concurrency 5. Times are UTC.
- Bursts on a few agents.
- 09:41: 9 manual starts on 4 agents within 25 s.
- From 10:17: failed runs from that burst auto-retried onto the same sessions.
- 10:59: 5 more manual starts within 18 s.
- Live runs then reached 13 runs on 6 sessions. They stayed at 13 for a total of 2 h 48 min between 10:59 and 13:52 (with short dips to 12), and at 10 or more for 4.5 h.
- One session carried 4 concurrent runs for 3 h 19 min; its memory was seen at 3.9 of its 4 GiB. Another session carried 3 runs for 2 h 53 min.
- In the 09:41 burst, start-to-exec latency was 76–164 s, against the usual 0–3 s.
- The quota never saw it. 13 runs in 6 sessions is within
maxSessionsPerOrg: 6. The quota engaged only once that day: a 7th agent needed a 7th session, and its run was parked for about an hour while 11 other runs were live. - Memory.
- 42 OOM kills inside session containers, spread over 6 containers. Each time the cgroup was at its 4 GiB limit with a swap limit of 0. The killed processes included
MainThread,node,tsgolintand headless Chrome. - One host-wide OOM (
global_oom) at 11:28. About 12 GiB of anonymous memory was in use, and 13claudeand 12 headless-Chrome processes were live. At that moment about 2.1 GiB of swap was still free. - MemAvailable fell to 1.6 GiB. Swap-in peaked at 5.8k pages/s, with 5.3k major faults/s, and page-in reached about 1.4 GB/s.
- 42 OOM kills inside session containers, spread over 6 containers. Each time the cgroup was at its 4 GiB limit with a swap limit of 0. The killed processes included
- CPU (sar, 10-minute samples).
- The 1-minute load average ran at 26–101 from 11:20 to 14:20. Six samples in that window were at 154–244, peaking at 244 at 14:00.
- The run queue reached 120, with up to 182 blocked processes.
- CPU idle stayed below 1 % from 11:20 to 14:20. System CPU ran at 27–54 % and iowait reached 30 %.
- The control plane stalled for about 4 h 45 min (11:18–16:04).
- Worker:
- 2,536 ×
timeout exceeded when trying to connectfrom the DB pool, across every pg-boss queue, includingtask.agent_retryandsandbox.release_idle. task.agent_drivefailed withCONNECT_TIMEOUT db:5432.- pg-boss LISTEN/NOTIFY heartbeats timed out.
- 2,536 ×
- API:
store "app_db" is unreachable(> 5 s), and Docker DNS lookups ofdbfailed withEAI_AGAIN.GET agent-runs/latestandPOST agent-runs/startreturned 503.- The health endpoint was observed taking about 7 s.
- Admin calls over SSH timed out after 10 min.
- Spawner: 15 ×
docker pstimeouts. One livenessdocker inspectfailed, and the session was treated as alive. - Watchdog: 129 re-attached abandoned turns, 19 refused resume claims, and 9 finalize claims burned while the run was still live.
- Worker:
- Outcome.
- 91 runs, of which 51 failed (30 of them
harness_error). - 52 auto-retries, of which 26 failed again. One task ran 8 times; another spent 554 run-minutes over 7 runs.
- About 64 run-hours went to runs that failed, against about 21 h and 33 h on the two days before.
- The p50 duration of settled runs rose from 49 to 71 min over the three days.
- 91 runs, of which 51 failed (30 of them
- It recurs. The day before, the same host peaked at 9 concurrent runs, load 26, 1.7 GiB of swap in use and 7 OOM kills. The day before that had 22 OOM kills.
Caveat on attribution. The run row never records an OOM kill: a memory-pressure death settles with the generic harness_error code. A CLI killed outright reads "The harness exited unexpectedly (exit code N)". 20 of the day's 30 harness_error runs say only "the agent run failed". No run recorded exit code 137, so kills can only be matched by timestamp: 6 of the 51 failures ended within 120 s of an OOM kill. 13 failures had other causes: 4 from a scheduled OS reboot, 7 credential_rotated, and 2 vendor rate limits.
Steps to reproduce
- On a Docker host with the default agent profile (4 GiB, 2 CPUs per session), have a project editor assign three or four tasks to one project agent.
- Start them all within a minute, with Start or by moving each card to In progress.
- Every run executes as its own Claude Code process in the agent's one session container. The org's session count stays at 1. With real coding work (builds, linters, headless browsers), the container's memory reaches the 4 GiB ceiling and the kernel OOM-kills processes inside it. Each failed run is retried at once into the same container.
Expected behavior
- Admission accounts for runs, not only sessions. Extra runs for a busy agent wait with a visible reason instead of piling into one container.
- Sandbox load cannot starve the platform's own API, database and worker.
- A run killed for lack of memory is not retried at once into the same saturated container.
Root cause
Line references are against main at 88259af.
- Admission counts sessions, and sibling runs join for free.
- Every start door ends in
kickAgentRun(services/platform/backend/domains/tasks/agent-runs.ts:158-249). - Its only concurrency guard is one live run per task (
agent-runs.ts:177-190,:231,services/platform/backend/db/migrations/0080_project_agent_runs_one_live.sql:46-48). - A run started by a project editor (or a schedule) is bound to the agent's standing session. A member's run gets a per-member session (
services/platform/backend/domains/tasks/run-authority.ts:110-126). ensureAgentSession(services/platform/backend/core/node_only/sandbox/agent_session.ts:68-168) then callsresumeSessionSlot. That function checks the org cap only for a stopped row. For an active row it is "an idempotent refresh that never re-counts" (services/platform/backend/domains/sandbox/sessions.ts:348-394).- The session is not released while any of the agent's runs is live (
sessions.ts:293-346). - So N runs = 1 slot = 1 cgroup.
- Every start door ends in
- Concurrent runs in one session are by design, except on the automated lane.
- The design is documented in
services/platform/backend/core/tasks/agent_run_host.ts:1050-1053andsessions.ts:598-601. - runnerd has no per-session exec cap; it only refuses a duplicate exec id (
services/sandbox-runtime/daemon/src/exec-manager.ts:190-193). - Automated and delegated starts, however, already refuse with
agent_busy: "one active piece of work per agent workspace" (services/platform/backend/domains/tasks/delegated-start.ts:68-70,:632-649). Human doors and auto-retry skip that check.
- The design is documented in
- Every run in a container shares its budget, and the container has no swap.
agentProfilesets 4 GiB and 2 CPUs (services/sandbox/src/config.ts:483-497), with--memory-swapequal to--memory(services/sandbox/src/session/docker-session-args.ts:419-422).- N CLIs, plus their headless browsers and linters, share one 4 GiB cgroup. They exhaust it, and the kernel OOM-kills one of them.
- Session memory cannot be swapped. Under host-wide pressure, the kernel can only drop page cache and swap out memory outside the sessions, which includes Postgres, the API and the worker. That fits the host-wide OOM with about 2.1 GiB of swap still free, and the heavy swap-in while the database stopped answering.
- Limits are ceilings, not reservations, and nothing ties them to the host.
SANDBOX_MAX_SESSIONSis explicitly "not a CPU or memory reservation" (services/sandbox/src/config.ts:444-449).- The spawner counts containers (
services/sandbox/src/session/session-routes.ts:182-186). - The quota check only compares the org's session counts with that cap (
services/platform/backend/domains/governance/routes.ts:186-229). Nothing comparesSANDBOX_MAX_SESSIONS× session memory with host RAM, so the default 8 × 4 GiB = 32 GiB is accepted on a 16 GB host. - The spawner already reads MemAvailable and CPU (
services/sandbox/src/capacity.ts:185-205), but only to report capacity (the Sandboxes settings page, device status), never to admit. - Session containers have the same CPU weight as the platform containers, which have no limits.
- Auto-retry feeds the fire.
- OOM and crash failures (
harness_error,session_gone,turn_crashed) are retryable (services/platform/backend/core/tasks/task_auto_retry.ts:58-74). They are retried "immediately — no backoff" (:7-13), armed inside the failing transaction (agent-runs.ts:472-486). - The retry job re-checks task state, budget and permission, but not capacity or whether the agent is busy (
services/platform/backend/jobs/task-list.ts:1039-1159). It keeps the failed run's starter, so it kicks the new run onto the same session. If sibling runs keep that session active, the retry joins it for free. - A spawner
429 session_quotabecomesstart_failed(services/platform/backend/core/tasks/start_failure.ts:25-46), and itsretry-afteris dropped. The run is not parked becauseisQuotaExceededErroronly matches the platform'sQUOTA_EXCEEDED(agent_run_host.ts:1421-1433).
- OOM and crash failures (
- The retry budget never runs out under slow thrash.
- Any attempt that executed for 15 min or more resets the 3-attempt streak (
task_auto_retry.ts:78,:219-244). So a run that slows past 15 min and is then OOM-killed never uses up its attempts. - Person-started runs skip the per-task hourly breaker (
task-list.ts:1120-1131).
- Any attempt that executed for 15 min or more resets the 3-attempt streak (
- Queueing is narrow and hard to see.
waiting_for_capacityis set only on the platform'sQUOTA_EXCEEDED(agent_run_host.ts:1391-1403). It is never set for joining an active session, for the spawner cap or for host pressure.- Parked runs are woken only when a session is released or destroyed (
sessions.ts:338-344,:434-442) and by the 2-minute watchdog (services/platform/backend/domains/tasks/watchdogs.ts:127-133), one per org each time. - The board's indicators list only
status = 'running'(services/platform/backend/domains/tasks/service.ts:4152-4157). A parked run shows as waiting only in its run entry (services/platform/app/features/tasks/components/task-agent-run-entry.tsx:271-276).
- Plausible, but not verified in logs: recovery timing assumes a healthy host.
RECOVERY_STALE_MSis 4 min (services/platform/backend/domains/sandbox/recovery.ts:19-24), but a cold create is allowed up to 180 s (SANDBOX_SESSION_CREATE_TIMEOUT_MS).- The 90 s drive windows go through pg-boss in batches of 5 (
services/platform/backend/jobs/runner.ts:33-45). - With 12 or more live runs, heartbeats can go stale. The watchdog then re-kicks or re-attaches, which adds churn at the worst moment. The 129 re-attaches above fit this pattern.
Impact
- Any deployment where people give agents several tasks at once can stall its own control plane: API, database, worker and admin access. That hits everyone on the deployment, not just the agents.
- The shipped defaults allow it. Even the default budget of 2 project sessions admits any number of runs. The quota and the spawner cap are validated against counts, never against host RAM or CPU.
- Direct waste: in one day, about 64 run-hours went to runs that failed, along with the model usage behind them. Retries went back into the saturated sessions.
- Resource deaths are classified as
harness_error, so neither operators nor users can see why runs fail.
Proposed fix
Paths below are relative to services/platform/backend/ unless they start with services/, packages/ or .env.example.
Recommended: one live run per agent session, with the rest queued and a visible reason
Apply the automated lane's agent_busy rule to every door:
- Before
ensureAgentSession, take a per-session advisory lock. If another run on the samesession_idis running, park this run with a reason. Reusewaiting_for_capacity_at_msand add a newwaiting_reasoncolumn (e.g.agent_busy). - When a run settles, fails or is cancelled, wake the oldest run parked on that session. Today's wake fires only on a session release, and that never happens while siblings are waiting.
- Optionally add a per-agent
maxConcurrentRunssetting (default 1) for large hosts.
Where:
core/tasks/agent_run_host.ts: start gate (~:967-998), park branch (:1391-1403), settle and release paths (:1885-1935, :2017-2029).domains/tasks/agent-runs.ts: a per-session variant ofwakeParkedAgentRuns(:639-667), and the reason inRUN_COLUMNS.domains/sandbox/sessions.ts: a settle-edge wake next toreleaseProjectAgentSessionSlot.domains/tasks/watchdogs.ts: a backstop wake per session.domains/tasks/delegated-start.ts:632-649: one shared helper so both lanes agree.domains/tasks/agent-turn-shim.ts:362-373.- A new migration, plus the run entry and locales.
Trade-offs:
- This removes the main multiplier: N runs in one cgroup. It also stops several CLIs from writing in one workspace at once.
- A busy agent works its tasks one after another, so the queue must be visible (see E).
- A woken run must keep the exec-fenced single-winner claim so it never double-starts.
Also needed (complementary, in priority order)
B. Treat capacity failures as capacity, and back off retries.
- When the spawner answers
429 session_quota(orhost_pressurefrom C) at start, park the run withretry-afteras the wake time, instead of failing it withstart_failed. - Classify resource deaths as a new code,
resource_exhausted. That covers exit 137 from the CLI or an OOM event on the session container. Retry these with exponential backoff throughstartAfterMs(e.g. 2 / 10 / 30 min). Exempt them from the 15-min progress reset. Route the retry through the busy and capacity admission so it can park. - Cap retries of person-started runs per task per hour as well.
- Where:
core/tasks/task_auto_retry.tsandcore/tasks/start_failure.ts.core/tasks/agent_run_host.ts(:1390-1433, :1604-1715).domains/tasks/agent-runs.ts:472-486andjobs/task-list.ts:1039-1159.core/node_only/sandbox/helpers/session_client.ts:91-102, for a typed capacity error.handleExecinservices/sandbox/src/session/session-routes.ts, so the exit event carries the OOM reason.
- Trade-offs:
- Genuine transient faults recover more slowly.
- The at-most-one-retry-arm invariant must hold.
- The exit reason has to be passed through runnerd and the spawner.
C. Admit by host headroom in the spawner.
-
Before a session create and before an agent exec, refuse with a typed
429 host_pressureplusretry-afterwhen either:- MemAvailable is below the session memory plus a platform reserve, or
- PSI (
/proc/pressure/{memory,cpu}) is above a threshold.
-
Use hysteresis so the decision does not flap.
-
At boot, warn (or clamp) when
SANDBOX_MAX_SESSIONS × SANDBOX_AGENT_MEMORYis more than host RAM minus the reserve. -
Where:
services/sandbox/src/capacity.ts: reuseparseMemoryand the host observation, and add PSI.services/sandbox/src/session/session-routes.ts:admit(:190-207),reserveCreate(:209-235) andhandleExec.services/sandbox/src/config.ts: newSANDBOX_MIN_AVAILABLE_MEMORY/SANDBOX_MAX_PRESSUREsettings..env.exampleandservices/sandbox/docs/sessions.md.
-
Trade-offs:
- It is the only guard that holds whatever the quota configuration.
- It works on a local Docker host only; on K8s, rely on pod requests.
- Readings are noisy.
- It gates only at start, so it needs A to stop growth inside a session.
D. Protect the control plane.
-
Give session containers a CPU weight well below the platform containers (
--cpu-shares/--cpu-weight), and optionally set--memory-reservation. -
Document the sizing rule next to the quota editor's deployment check.
-
Where:
services/sandbox/src/session/docker-session-args.ts:419-438andservices/sandbox/src/config.ts:444-497.services/sandbox/docs/sessions.mdand.env.example.- Optionally
domains/governance/routes.ts:186-229, to compare total × memory with host RAM through/v1/limits.
-
Trade-offs:
- It is cheap, costs nothing when idle, and keeps the API, health checks and admin calls usable.
- It does not stop oversubscription on its own.
E. Make waiting visible.
-
Include queued runs that have a waiting reason in the ops indicators. Show "waiting for a sandbox slot" or "waiting for " on the board card.
-
Show how many runs share each session in the Sandboxes settings.
-
Show the
/v1/capacitypressure snapshot as a banner. -
Add metrics for parks, wakes and resource failures.
-
Where:
domains/tasks/service.ts:4144-4194and its all-projects sibling.services/platform/app/lib/backend/contract/tasks.ts.- The board card,
services/platform/app/features/tasks/components/task-agent-run-entry.tsx:271-276andservices/platform/app/features/settings/sandboxes/*. - Locales, docs, the platform's manual-test boxes and
services/platform/tests/manual/reference/error-codes.md.
-
Trade-offs:
- It reduces no load by itself.
- It makes the queueing from A–C understandable, and it stops users from re-starting runs by hand.
Alternatives considered
F. Count runs, not sessions, against the quota.
- Add
maxAgentRunsPerOrgtosandbox_quota, admit each run underlockOrgAdmission, and validate the budget against a ceiling the spawner exposes. - This fixes the accounting hole org-wide. Costs:
- It changes a shipped config schema.
- A leaked run slot blocks the whole org.
- On its own it still lets several runs share one 4 GiB cgroup, so it is only worth doing together with A.
- Where:
packages/shared/src/schemas/governance.ts:143-160andcore/sandbox/quota_policy.ts.domains/sandbox/sessions.ts:355-394andcore/node_only/sandbox/agent_session.ts:94-117.domains/governance/routes.ts:186-229and the spawner's/v1/limits.- The quota editor, fixtures and docs.
G. Make recovery robust under load (secondary).
-
Raise the stale-start threshold above the create timeout plus staging time, or give an in-flight start a lease heartbeat.
-
Deduplicate
task.agent_driveper exec with asingletonKey. -
Stop tying the 90 s drive windows to worker batch slots.
-
Where:
domains/sandbox/recovery.ts:19-24anddomains/tasks/reattach.ts:99-152, 181-248.domains/tasks/agent-turn-shim.ts:888-900.jobs/runner.ts:33-45andjobs/tasks.ts.
-
Trade-offs:
- It removes churn, not the overload.
- Genuinely dead chains are detected more slowly.
- It touches the exactly-once machinery.
Acceptance criteria
-
One run per session. Start N ≥ 2 tasks on one agent through any door: manual start, move to In progress, @mention, delegation or auto-retry. At most one of them (or
maxConcurrentRuns) runs in that agent's session at a time. The rest arequeuedwith a waiting reason. An integration test covers each door. -
Queued runs wake correctly.
- A queued run starts within one wake cycle after the run ahead of it settles, fails or is cancelled, without the session being released.
- Runs start in FIFO order.
- A run never double-starts when a settle-edge wake races the watchdog.
- An integration test covers this.
-
Capacity refusals park. A spawner
429 session_quotaorhost_pressureat start parks the run, with the reason set andretry-afterhonoured, instead of failing it. Unit and integration tests. -
Host-headroom admission. The spawner refuses a create or exec with
host_pressurewhen MemAvailable is below the configured threshold. It warns at boot whenSANDBOX_MAX_SESSIONS × SANDBOX_AGENT_MEMORYis more than host RAM minus the reserve. Unit tests with fixture/procfiles. -
OOM deaths are classified and backed off. An OOM-killed agent CLI settles with a distinct resource failure code, not
harness_error. Its auto-retry:- is delayed with backoff,
- does not get the 15-min progress reset,
- goes through admission.
Unit tests in
task_auto_retryand an integration test for the settle path. -
Person-started retries are capped per task per hour.
-
CPU weight. Session containers run with a lower CPU weight than the platform containers.
-
Waiting is visible. The board card and run entry show why a run is waiting, in every shipped locale and with an accessible label. The Sandboxes settings show runs per session.
-
Load test.
- Setup: a 4 vCPU / 16 GB host, or a runner with the same cgroup limits, with default settings. Start 12 runs across 7 agents within 30 s, using a harness stub that allocates about 2 GiB and keeps a CPU busy.
- Expected results:
- no host-wide OOM;
- MemAvailable stays above the reserve;
- no DB pool connection timeouts;
/api/healthp95 under 1 s;- extra runs wait with a visible reason;
- no run fails for lack of capacity.
-
Docs. Update
.env.example,services/sandbox/docs/sessions.md, the quota docs and the platform manual-test suite (new boxes and error codes).
Out of scope
- Resizing hosts. A bigger host only moves the threshold. The run-per-session gap is the same on any host, and the same defaults accept 8 × 4 GiB sessions whatever the host's RAM.
- Other failures that day. The scheduled OS reboot that ended 4 runs, the
credential_rotated401s and the vendor rate limits had separate causes, not load.
Activity
fix(platform): collapse busy-retry checks and keep their refusal final
fix(platform): hand a drained job over with its key, in one transaction
test(manual): register the worker drain hand-over lane
test(platform): prove a busy refusal is one transaction, delivered twice
chore(platform): rerun the checks after a type-check heap exhaustion
test(platform): keep the exec-limit lane's ops out of org metrics
fix(platform): count a refused exec as a room wait, not a cancelled turn
fix(platform): park a run refused at the sandbox exec cap, not fail it (
yannickmonney commentedon Oct 10, 2026
Status on main (73d03a9), from the sandbox footprint and robustness work:
some avg10at 60 % or more refuses with 429host_cpu; starts resume one per 10 s from the front of the line) and caps automatic capacity at two sessions per CPU. fix(sandbox): end stalled execs and refuse new ones in a session out of memory #4627 refuses a new exec into a session at 90 % of its memory limit (session_memory_busy) and ends hung turns (turn_stalled).OOM_KILLED/SESSION_OOM→resource_exhausted); fix(platform): bound retry and worker cleanup #4643 holds a task run's retry 2, then 10, then 30 minutes (automation nodes: 2 minutes).Follow-ups found on the way: #4717 (final failure announced late after the OOM hold), #4718 (a full but idle session refuses every exec), #4723 (automation nodes' OOM hold), #4726 (memory reservation for the database and platform).
The premise of this issue — concurrent runs of one agent piling into one session — no longer holds on main; left open for the owner to close or narrow.
tale-code-bot commentedon Oct 30, 2026
I re-checked this issue against
mainat b2560c2 andtrainat 8b6fb96 (TALE-47).Fix A is done on
main#4603 (4b3664b) did it. That commit is on
main,release/0.6,trainandfeature-train.Each run of an agent now claims a worker of its own:
dispatch and the automatic retry all call
kickAgentRun. Before anything runs, thetask.agent_turnjob claims a worker (claimAgentWorker,services/platform/backend/jobs/task-list.ts:1604, andservices/platform/backend/domains/tasks/agent-workers.ts). The claim holds the agent's lockand the organization's admission lock.
project_agent_runs_one_per_worker, migration0167).
waiting_reason(org_limit,host,destroy_pending,exec_limitormodel_capacity). The Run row, the timeline and the chattray say so in EN, DE and FR.
(
releaseProjectAgentSessionSlot,services/platform/backend/domains/sandbox/sessions.ts:392),and the 2-minute watchdog wakes parked runs as a backstop.
TASK-R24toTASK-R27inservices/platform/backend/domains/tasks/spec.md.passed 2344 of 2344 checks across 290 lanes. The
agent workerslane's 15 checks and thebusy agent retrylane's 7 are among them.Filed as separate issues
Each is labelled
agent-readyand links here.15-minute reset, and no cap on retries of a person's run).
the boot warning and the sizing rule).
These related issues were already open:
Checked and not filed
Capacity refusals park (B.1): done. With fix(platform): wait for sandbox room instead of failing the run #4099 and fix(platform): park a run refused at the sandbox exec cap, not fail it #4481, a spawner 429 parks the run as
hostand wakes it at its place in line.Out-of-memory classification (B.2): done by feat(sandbox): attribute OOM kills and retry out-of-memory runs after a pause #4633:
OOM_KILLEDandSESSION_OOMbecomeresource_exhausted. Two cases are still not attributed. I saw both only in the code, neverin a run:
session_goneand is retried at once.Host admission (fix C): in. Memory admission came with fix(sandbox): free idle compute, bound helpers, admit by memory and disk #4098 and fix(sandbox): honor memory overrides and retry disk relief #4169, CPU-pressure pacing
with perf(sandbox): size capacity by CPU, pace starts under CPU pressure, fork-free device status #4626 and feat(platform): dispatch, admission and leases for agent fleets #4987. Three points stay as designed:
SANDBOX_MAX_SESSIONSturns memory admission off (Follow-ups from the #4098 review: an explicit SANDBOX_MAX_SESSIONS still refuses on host memory, the waiter line drops slow askers, disk relief can pause for 6 h #4124's request); feat(sandbox): warn when the session limit times agent memory exceeds the host's memory #5149 addsthe warning;
conservativeadmission preset;that case is narrow, and runnerd's
session_memory_busyand four-exec cap bound it.CPU weight (fix D): done by fix(sandbox): keep the spawner healthy through restarts and stuck states #4551: agent sessions get
--cpu-shares256, against the 1024the database, backend and spawner keep. On Kubernetes, session pods request the same 250m CPU
as the documented platform pods. Incus maps no weight, which its docs say.
Fix F: done. Each worker is one slot of the organization's agent-worker budget, so
concurrent runs are counted.
A capacity banner (fix E): not filed. The Run row, the timeline and the Dispatch tab already
say that a start waits for room. A banner would be a new screen element, which is a person's
call.
Fix G: partly done. Drive windows now run in slots of their own (G3). Two points remain:
singletonKeyontask.agent_drive(G2).This issue lists fix G as an alternative and marks its cause as not verified, and I saw no
failure from either point. I filed neither.
TALE-47 goes back to triage with this evidence. Nothing in this issue's scope is left outside the
issues above.
tale-code-bot commentedon Oct 30, 2026
Closing as completed. Fix A shipped in #4603: each agent run now gets a worker of its own instead of piling into one sandbox session. Its merge commit
4b3664b2562fd827068260fe031d3739be77fd2c(2026-10-09) is an ancestor ofmainat49ce42fdd3b20a452a2572554c587f4f89bdb4f8(release/0.6is the same commit). The status comment of 2026-10-10 above says the same.The parts still missing are tracked in issues of their own, each linking back here: #5147, #5148, #5149, #5150, #5151 and #5152. #4726, #4717, #4723, #5146 and #4720 were already open. The comment of 2026-10-30 above lists what was checked and left unfiled, and why.
Board task: TALE-47.
test(load): run the agent burst on the Load workflow against the sandbox
test(load): prove a 4 vCPU / 16 GB host holds a burst of agent runs
test(load): prove a 4 vCPU / 16 GB host holds a burst of agent runs