Repository navigation
fix(agents): preserve sandbox skills during concurrent runs - #181807
yinx65588-boop wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. What this changesThis PR publishes retained per-run skill catalogs and keeps their instructions and companion files until execution cleanup settles. Example: Run A advertises OriginalAlpha, then runs B and C publish ReplacementBeta and ReplacementGamma in the same Docker sandbox.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain This PR addresses a concrete concurrency bug, but remote sandbox integration needs correction before merge. Priority: P1 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherSandbox preparation materializes eligible host skills, maps their locations into the sandbox, and supplies the agent prompt; execution owners release those files after asynchronous work settles. flowchart LR
A[Eligible source skills] --> B[Workspace materializer]
B --> C[Retained run catalog]
C --> D[Sandbox transport]
C --> E[Prompt snapshot]
E --> F[Agent tool reads]
D --> F
F --> G[Execution cleanup]
Technical reviewBest possible solution: Keep execution-owned catalogs in the existing materializer and make remote delivery publish and retain each advertised catalog before tools can read it. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the shared refresh/read interleaving, supported by the linked official-release reports and submitted baseline reproduction; source inspection also establishes the introduced reused-SSH missing-path failure, without executing target code. Is this the best way to solve the issue? Retaining instructions and companion files through the existing execution owner is appropriate, and the added lifecycle and recovery machinery serves distinct failures; the cutover is incomplete because remote transports do not consume the new catalog lifecycle. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e96c7041019b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +384, Tests +359, Docs +6, Other -6. Total +743 across 18 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 23, 2026, 2:30 PM ET / 18:30 UTC. |
Closes #122554
What Problem This Solves
Fixes sandboxed agents reading another run's skill instructions, or losing advertised skills, when concurrent runs refresh a shared skills directory.
User Impact
An active run keeps its advertised instructions and companion files until its tools and asynchronous cleanup finish. Eligible copies remain readable by a non-host container user without changing source permissions. No configuration changes or migration are required. Sandbox owner/security review is appropriate for this change.
Why This Change Was Made
Publish a retained catalog below the existing mounted directory and prepare the prompt from that exact catalog. Reuse the existing disposable sandbox result and asynchronous work owner; native staging locks preserve live catalogs and permit cleanup after a process dies. Settled turns keep their session's prompt locations. An ordinary copy failure omits that skill with a warning; required library selections still fail. Preparation copies each run's catalog rather than relying on mutable shared copies.
This builds on the investigation and unmerged implementation in #122679 by @eightHundreds, including its unresolved copy-failure, SDK-lifetime and abandoned-directory findings.
Evidence
4b85835fc16692ebc86b491913b1f6f989df7a79, checked out directly without applying a patch. Four real agent turns completed through the built CLI and Gateway with actual Docker reads. The pinned workflow and controlled fixture reproduce the run; the HTTP model is synthetic and isolated to loopback.Exact-head result, verified against the downloaded artifact and source stamp:
The final change retains the existing mount, SDK disposer and async-work owner. The additional catalog publication/custody code is necessary to keep both instructions and companion files alive; production +394/-10, tests +362/-3, docs +6, and six obsolete mock-baseline rows removed.
Linux/Docker is exercised. Live SSH/OpenShell transport concurrency and Windows execution are not covered by this proof.
Repository automation note: Auto response on this PR fails in the unchanged Barnacle
isPrivilegedActorcode (Cannot read properties of undefined (reading 'owner')). The same failure on an unrelated PR confirms it also occurs outside this change; it is separate from the sandbox validation above.