-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Bug: sandbox.mode: "non-main" silently breaks sessions_spawn subagent initialization #39248
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
When
agents.defaults.sandbox.modeis set to"non-main", sub-agents spawned viasessions_spawnfail to initialize. Sessions are accepted (return validchildSessionKeyandrunId) but never start executing — zero tokens, zero messages, no transcript files created. No errors appear in gateway logs.Environment
Steps to Reproduce
agents.defaults.sandbox.mode: "non-main"in configsessions_historyorsubagents listafter 30+ secondsExpected Behavior
Sub-agent starts within seconds,
systemSent: true, tokens accumulate, task completes.Actual Behavior
sessions_spawnreturnsstatus: "accepted"with valid session keysubagents listasrunningsessions_historyreturnsmessages: []indefinitelysystemSentnever set totruetotalTokensnever setrunTimeoutSecondsBisect Results
Systematically tested with a simple one-line task (
Reply with exactly: ...):The issue is not caused by specific Docker settings (network, readOnlyRoot, tmpfs). Any
sandbox.modethat enables Docker for subagents causes silent failure.Notes
sandbox.mode: "non-main"on the same config — they appear to use a different code path that bypasses container initialization.sandbox.mode: "all"and its own Docker settings works correctly.Workaround
Set
agents.defaults.sandbox.mode: "off"and use per-agentsandbox.mode: "all"overrides for agents that specifically need sandboxing (e.g., coding agents withtools.exec.host: "sandbox").