Skip to content

feat(sandbox): add Daytona cloud sandbox backend plugin - #121554

Merged
Patrick-Erichsen merged 19 commits into
openclaw:mainfrom
mislavivanda:feat/daytona-sandbox-backend
Aug 27, 2026
Merged

Patrick-Erichsen merged 19 commits into
openclaw:mainfrom
mislavivanda:feat/daytona-sandbox-backend

Conversation

@mislavivanda

@mislavivanda mislavivanda commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw sandboxing currently requires local container infrastructure (Docker/Podman), an SSH-reachable machine, or an OpenShell account. Operators who want isolated agent tool execution without managing any of that have no cloud-API-only option.

This PR adds daytona as a sandbox backend: agent tool execution (exec, read, write, edit, apply_patch, media reads) runs inside Daytona cloud sandboxes over the Daytona toolbox API (HTTPS). No SSH keys, no inbound connectivity, no local container runtime. The Gateway, agent loop, model calls, and channels stay on the host.

Context: maintainer invitation on Slack (OpenClaw channel): "Yea open to a PR where Daytona could be used as a sandbox backend, the plugin surface should be pluggable" — it was; no SDK changes were needed.

Why This Change Was Made

  • Follows the established sandbox-backend plugin pattern: external official plugin (@openclaw/daytona-sandbox, bundledDist: false) mirroring @openclaw/openshell-sandbox and @openclaw/mxc-sandbox, registered via registerSandboxBackend from openclaw/plugin-sdk/sandbox.
  • Reuses core's canonical machinery instead of duplicating policy:
    • createRemoteShellSandboxFsBridge (same bridge as the SSH backend) drives all file tools. The plugin only supplies the transport: Daytona's exec API merges stdout/stderr and is not binary-safe, so commands are wrapped to redirect streams to files and emit them base64-encoded — binary-exact, exit-code-preserving, one API call.
    • buildValidatedExecRemoteCommand / workdir-validation scripts shared with the SSH backend for identical env/cd/validation semantics.
  • Exec rides a per-exec launcher child process (mxc pattern): buildExecSpec returns [node, daytona-exec-launcher.mjs, --payload-file, …]. Non-PTY execs use Daytona sessions (async run, exit-code polling — never trusting log-stream end, stdin forwarding, streamed logs with catch-up dedupe); TTY execs use Daytona's PTY surface (resize, byte-faithful stdin, exit codes). Remote command kill on SIGTERM/SIGINT.
  • One Daytona sandbox per sandbox scope (agent/session/shared), adopted across Gateway restarts through the sandbox registry (registeredRuntimeIds); sandboxes are labeled openclaw.sandbox=1 plus a hashed scope label.
  • Remote-canonical workspace (SSH-backend model): tar-based one-time seed with symlink-escape audit; openclaw sandbox recreate deletes the sandbox and re-seeds on next use.
  • Auth: apiKey accepts plaintext or SecretRef (env/file/exec) with DAYTONA_API_KEY fallback; the key reaches the launcher via an owner-only (0600) payload file deleted at read — never argv or inherited env. Exec child env is sanitizeEnvVars-filtered.
  • Config surface (all under plugins.entries.daytona.config): apiKey, apiUrl, target, snapshot | image + resources (mutually exclusive; resources only for image-based creates), user, volumes, autoStopInterval/autoPauseInterval (Daytona allows at most one non-zero), autoArchiveInterval, autoDeleteInterval, networkBlockAll/networkAllowList/domainAllowList, remoteWorkspaceDir, remoteAgentWorkspaceDir, timeoutSeconds. Deliberately skipped: ephemeral (autoDeleteInterval: 0 covers it and it fights adoption), envVars (env flows per-exec like SSH), labels/public/ttlMinutes (not needed for an exec sandbox).
  • Activation is onConfigPaths: ["plugins.entries.daytona"] (mxc pattern) — the plugin loads only when configured instead of on every Gateway boot.

User Impact

  • New opt-in backend: agents.defaults.sandbox.backend: "daytona" (docs: docs/gateway/daytona.md + a section in docs/gateway/sandboxing.md). No behavior change for anyone who does not enable it; defaults untouched.
  • Cost behavior: Daytona auto-stops idle sandboxes (default 15 min); the backend restarts them on next use. OpenClaw prune (sandbox.prune.*) deletes Daytona runtimes like Docker ones.
  • Known limitations (documented): no browser sandboxing; sandbox.docker.* does not apply (binds rejected loudly); no mirror mode (remote-canonical only); non-PTY exec stdin is line-oriented text.
  • Distribution: external official plugin — excluded from core dist (root package.json), added to the official install catalog, published to npm + ClawHub by release automation. Install: openclaw plugins install @openclaw/daytona-sandbox.

Evidence

Unit + contract (all green):

  • pnpm test extensions/daytona — 48 tests: config validation matrix (mutual exclusions, interval conflict, volume overlap), adoption (missing/dead/stopped candidates), tar seeding + symlink-escape refusal, exec payload/argv/env sanitization, binary-safe stdout/stderr transport (fake sandbox executing wrapped commands through real local /bin/sh), fs bridge write/read/rename/remove + read caps + mount-escape rejection through core's real pinned-python bridge, manager describe/remove. One GNU-stat test is Linux-gated (BSD stat on macOS dev machines).
  • src/plugins/bundled-plugin-metadata.test.ts (37), package-manifest.contract + extension-runtime-dependencies.contract (505), featured/install catalog (20) — green.
  • Manifest configSchema is asserted byte-equal to the runtime zod schema.

Live E2E against real Daytona (repeatable):

OPENCLAW_E2E_DAYTONA=1 node --env-file=.env scripts/run-vitest.mjs extensions/daytona/src/backend.e2e.test.ts
# + image-based create path:
OPENCLAW_E2E_DAYTONA=1 OPENCLAW_E2E_DAYTONA_IMAGE=1 node --env-file=.env scripts/run-vitest.mjs extensions/daytona/src/backend.e2e.test.ts

Proves end to end (~12s / ~4s): sandbox create + tar seed, exec through the real spawned launcher (cwd, env propagation, exit code 7 + stderr), PTY exec (exit code 4), backend workdir validation, binary fs-bridge round trip + remote stat, adoption by a second factory call, manager describe (running/label match) and remove; image path additionally proves python:3.13-slim + explicit resources. Teardown verified: zero leftover openclaw.sandbox-labeled sandboxes after runs. Partial resources live-probed: omitted fields fall back to Daytona defaults (1 vCPU / 1 GB / 3 GiB).

Repo gates: full check:changed (exit 0; typecheck-all, lint 0 errors across core/extensions/scripts, dead-export scan, SDK contract manifests, npm-lock guard, import cycles), pnpm build green with the plugin correctly excluded from core dist, CLI smoke (openclaw plugins info daytona → loaded via config-path activation; config schema validates through the manifest). Structured pre-land review run repeatedly during development; final pass clean with no actionable findings.

Validation notes: user, volumes, networkAllowList/domainAllowList, autoPauseInterval, autoArchiveInterval are verified against the @daytona/[email protected] create contract and unit-tested as exact pass-through; they are not live-exercised in e2e because each needs org fixtures (pre-created volume, VM-based runner class for pause, image with the custom user). Server-side rejections surface loudly through the backend error path.

Follow-ups / open questions for maintainers

  1. Mirror workspace mode — happy to add it. Cleanest shape is extracting OpenShell's mirror machinery (mirror sync + local-first fs bridge) into a shared SDK helper both plugins consume (the "SDK layer changes" conversation); a plugin-local mirror-lite is also feasible if you prefer it contained. Which direction would you take?
  2. Browser sandboxing — needs a core seam: browser provisioning is docker-shaped today (ensureSandboxBrowser, prune hardcodes the docker manager), so backends cannot supply their own browser. Daytona-side feasibility (CDP over preview URLs; WS proxying already powers Daytona's PTY) looks plausible and we can spike it with evidence if there's interest in defining the seam.
  3. docs/gateway/sandboxing.md backend comparison tables: we added a Daytona section + values-row entry but no column in the two wide tables (mxc precedent — curated, not exhaustive). Say the word and we'll add columns.
  4. Known self-healing edge (documented intent, not a silent failure): a sandbox that auto-stops mid-run (>15 min idle between tool calls within one turn) fails that exec visibly; the next factory call restarts it. Could be absorbed by a start-if-stopped in the launcher as a follow-up.
  5. Pre-existing generated-docs drift on main (docs/plugins/reference/{cua-computer,google,sms}.md vs their manifests) was deliberately excluded from this PR to keep it Daytona-only.

Maintainer action needed: create the extensions: daytona GitHub label (.github/labeler.yml entry is included here).

After-fix live evidence (real Daytona, current head)

Both live E2E scenarios, run against a real Daytona org:

✓ extensions/daytona/src/backend.e2e.test.ts (2 tests) 14745ms
  ✓ provisions an image-based sandbox with explicit resources          3998ms
  ✓ provisions, executes, bridges files, adopts, and removes a real sandbox  10048ms
Test Files  1 passed (1) · Tests  2 passed (2)

Raw transcript of the remote behavior (API key redacted; sandbox deleted at the end):

=== Daytona live transcript (redacted) ===
created sandbox id=467a46db-b013-456f-98a0-0a9e708c9603 state=started
exec uname/whoami (exit 0):
Linux 467a46db-b013-456f-98a0-0a9e708c9603 6.8.0-136-generic #136-Ubuntu SMP ... x86_64 GNU/Linux
daytona
exec exit-code propagation: exitCode=7 output=marker
binary roundtrip via toolbox fs: [0,1,254,255]
adoption lookup by id: state=started matches=true
deleted; leftover sandboxes with evidence label: 0

Note on the "stored data model" flag: the launcher payload file is transient per-exec state — created 0600, deleted by the launcher at read and by finalizeExec as a fallback. Nothing is persisted; no migration surface exists.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts docker Docker and sandbox tooling size: XL labels Aug 10, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 26, 2026, 9:58 PM ET / August 27, 2026, 01:58 UTC.

ClawSweeper review

What this changes

Adds an opt-in Daytona cloud sandbox plugin, with remote command/file transport, configuration, documentation, catalog wiring, and tests.

Merge readiness

⚠️ Needs maintainer review before merge - 8 items remain

Keep open: the Daytona backend still fails to forward EOF for PTY sessions, and its configuration documentation is inconsistent across the sandbox guides.

Priority: P2
Reviewed head: 2944c5e591573dd6cb6a2b71c636f1f3d1304bd6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong real-service evidence supports the main backend flow, but two concrete correctness gaps and pending dependency review prevent merge readiness.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body includes redacted real-Daytona after-fix E2E output for creation, execution, filesystem transport, adoption, and deletion; the EOF defect still needs focused regression proof.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body includes redacted real-Daytona after-fix E2E output for creation, execution, filesystem transport, adoption, and deletion; the EOF defect still needs focused regression proof.
Evidence reviewed 6 items EOF is a supported process action: The process schema exposes eof to close stdin, and the process action calls stdin.end() after writing.
Daytona leaves stdin open but never forwards PTY EOF: The backend requests pipe-open stdin, while the launcher forwards only data chunks and has no end handler.
Sibling PTY launcher preserves EOF: MXC forwards stdin end as terminal EOT, establishing the corresponding sandbox-launcher behavior.
Findings 2 actionable findings [P1] Forward EOF to Daytona PTYs
[P2] Document Daytona in the canonical agent configuration reference
Security Needs attention Review the newly executed Daytona SDK dependency graph: The plugin imports @daytona/sdk for remote sandbox control, while the submitted lockfile adds its transitive graph; direct package-source inspection was unavailable and the repository guard requires admin or security authorization for this head.

How this fits together

OpenClaw selects a sandbox backend for agent shell and file tools. This plugin routes those operations through a local launcher to Daytona cloud sandboxes while the Gateway remains on the host.

flowchart LR
  A[Agent process tool] --> B[Open stdin pipe]
  B --> C[Daytona sandbox backend]
  C --> D[Daytona launcher]
  D --> E[PTY or session transport]
  E --> F[Daytona cloud sandbox]
  F --> G[Output and exit status]
Loading

Decision needed

Question Recommendation
Should OpenClaw own and publish Daytona as an official in-tree external plugin, or should the backend be maintained as a separately hosted plugin? Use a separately hosted plugin: Keep the sandbox SDK seam and move the Daytona integration to independently maintained npm/ClawHub distribution.

Why: The code uses the existing plugin seam, but VISION.md sets a high bar for optional commercial-service integrations and prefers independently maintained plugins absent explicit sponsorship.

Before merge

  • Forward EOF to Daytona PTYs (P1) - pipe-open lets the process tool close stdin with eof, but this launcher only forwards data. A PTY command waiting for EOF, such as cat, therefore hangs until timeout. Serialize input and send EOT after the final chunk; add a regression that completes only after EOF.
  • Document Daytona in the canonical agent configuration reference (P2) - This change advertises backend: "daytona", but the configuration reference still presents the backend enum and backend details without Daytona. Readers following that linked reference are told it is unsupported and are not routed to its plugin configuration.
  • Resolve security concern: Review the newly executed Daytona SDK dependency graph - The plugin imports @daytona/sdk for remote sandbox control, while the submitted lockfile adds its transitive graph; direct package-source inspection was unavailable and the repository guard requires admin or security authorization for this head.
  • Resolve merge risk (P1) - The new remote-execution SDK and lockfile graph need explicit exact-head dependency authorization and direct package-contract inspection before merge.
  • Resolve merge risk (P1) - The branch is behind current main; rebase and refresh the cross-guide documentation review without assuming a three-way merge drops main-only behavior.
  • Resolve merge risk (P1) - VISION.md prefers optional plugins to be maintained outside the main repository unless an owner sponsors official in-tree ownership.
  • Complete next step (P2) - The mechanical findings are clear, but product ownership and exact-head dependency authorization require maintainer action before any repair lane should proceed.

Findings

  • [P1] Forward EOF to Daytona PTYs — extensions/daytona/src/daytona-exec-launcher.mjs:129-131
  • [P2] Document Daytona in the canonical agent configuration reference — docs/gateway/sandboxing.md:33
  • [medium] Review the newly executed Daytona SDK dependency graph — extensions/daytona/package.json:14
Agent review details

Security

Needs attention: The added remote-execution dependency graph is security-sensitive and remains blocked for exact-head authorization.

PR surface

Source +1899, Tests +1567, Docs +275, Config +54, Other +688. Total +4483 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 9 1900 1 +1899
Tests 6 1571 4 +1567
Docs 6 282 7 +275
Config 5 56 2 +54
Generated 0 0 0 0
Other 3 699 11 +688
Total 29 4508 25 +4483

Review metrics

Metric Value Why it matters
Production versus test delta production +1,575/-0; tests/support +1,576/-5; docs/metadata +680/-9; lockfile +677/-11 The positive production growth implements a new backend, but its configuration and remote-execution surface warrants owner review.
New configuration surface 16 documented plugin settings The new settings govern credentials, network egress, remote workspaces, and sandbox lifecycle behavior.

Stored data model

Persistent data-model change detected: serialized state: extensions/daytona/src/daytona-exec-launcher.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Repair EOF and documentation before merge (recommended)
    Serialize PTY input with final EOT forwarding, add a completion-on-EOF regression, and document Daytona in the canonical agent configuration reference.
  2. Pause pending ownership and dependency review
    Do not merge until an owner sponsors the official plugin and the exact dependency graph is authorized.

Technical review

Best possible solution:

Use one ordered stdin-forwarding queue that sends PTY EOT only after prior input, update the canonical agent configuration guide, then obtain an owner decision and exact-head dependency authorization.

Do we have a high-confidence way to reproduce the issue?

Yes: the current source establishes that process eof closes the local pipe but the Daytona PTY bridge never forwards terminal EOF; a PTY command such as cat will wait until timeout.

Is this the best way to solve the issue?

No: the current implementation omits the owner-boundary EOF forwarding path, and the documentation leaves the canonical configuration reference inconsistent.

Full review comments:

  • [P1] Forward EOF to Daytona PTYs — extensions/daytona/src/daytona-exec-launcher.mjs:129-131
    pipe-open lets the process tool close stdin with eof, but this launcher only forwards data. A PTY command waiting for EOF, such as cat, therefore hangs until timeout. Serialize input and send EOT after the final chunk; add a regression that completes only after EOF.
    Confidence: 0.99
  • [P2] Document Daytona in the canonical agent configuration reference — docs/gateway/sandboxing.md:33
    This change advertises backend: "daytona", but the configuration reference still presents the backend enum and backend details without Daytona. Readers following that linked reference are told it is unsupported and are not routed to its plugin configuration.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6ae89b5a8ed6.

Labels

Label justifications:

  • P2: This opt-in backend has a concrete process hang and documentation mismatch, while existing sandbox backends remain available.
  • merge-risk: 🚨 security-boundary: The plugin adds a remotely executed SDK path carrying an API credential and command payloads.
  • merge-risk: 🚨 availability: PTY commands that require EOF can remain running until their configured timeout.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body includes redacted real-Daytona after-fix E2E output for creation, execution, filesystem transport, adoption, and deletion; the EOF defect still needs focused regression proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted real-Daytona after-fix E2E output for creation, execution, filesystem transport, adoption, and deletion; the EOF defect still needs focused regression proof.

Evidence

Security concerns:

  • [medium] Review the newly executed Daytona SDK dependency graph — extensions/daytona/package.json:14
    The plugin imports @daytona/sdk for remote sandbox control, while the submitted lockfile adds its transitive graph; direct package-source inspection was unavailable and the repository guard requires admin or security authorization for this head.
    Confidence: 0.96

What I checked:

Likely related people:

  • Patrick Erichsen: Authored the final Daytona lifecycle and publication-route updates on the reviewed head. (role: recent contributor; confidence: high; commits: 292918d2efec, 2944c5e59157; files: extensions/daytona/src/daytona-exec-launcher.mjs, extensions/daytona/package.json)
  • Paul Campbell: Authored the MXC sandbox backend whose launcher provides the relevant stdin/PTY precedent. (role: sibling backend author; confidence: medium; commits: 008f04a65650; files: extensions/mxc/src/mxc-spawn-launcher.mjs)
  • Peter Steinberger: Recent history shows repeated sandbox and extension-boundary refactors in the affected sibling area. (role: adjacent sandbox contributor; confidence: medium; commits: 5a29e20e9926, 827b0de0ce74; files: extensions/mxc/src/mxc-backend.ts, extensions/openshell/src)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Forward ordered EOF to PTY commands and add an EOF-completion regression.
  • Update docs/gateway/config-agents.md to include Daytona and its configuration route.
  • Obtain exact-head dependency authorization and an ownership decision.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-26T23:50:28.488Z sha 1567906 :: found issues before merge. :: [P1] Check cancellation before submitting filesystem commands | [P1] Stop launcher startup before submitting the session command
  • reviewed 2026-08-27T00:43:08.289Z sha e7059f7 :: needs changes before merge. :: [P1] Clean up PTY sessions after launcher failures | [P1] Delete newly created sandboxes when seeding fails | [P1] Serialize first Daytona provisioning for each scope | [P3] Synchronize the live abort probe on remote state
  • reviewed 2026-08-27T00:53:46.981Z sha 429e114 :: needs changes before merge. :: [P1] Clean up PTYs when startup or waiting fails | [P1] Delete newly created sandboxes when seeding fails | [P1] Serialize initial Daytona provisioning per scope
  • reviewed 2026-08-27T01:00:35.851Z sha 429e114 :: needs changes before merge. :: [P1] Clean up PTYs when startup or waiting fails | [P1] Delete newly created sandboxes when seeding fails | [P1] Serialize initial Daytona provisioning per scope
  • reviewed 2026-08-27T01:13:31.436Z sha 2e3a52c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T01:26:01.610Z sha 2e3a52c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T01:33:44.994Z sha f219949 :: found issues before merge. :: [P1] Await PTY termination before returning on a signal | [P2] Record the published ClawHub route in the official catalog
  • reviewed 2026-08-27T01:43:36.638Z sha 99af2ad :: needs changes before merge. :: [P1] Forward EOF to Daytona PTYs | [P1] Await PTY termination before returning on a signal

@mislavivanda
mislavivanda force-pushed the feat/daytona-sandbox-backend branch from 6207470 to f4daf61 Compare August 10, 2026 13:52
@openclaw-barnacle openclaw-barnacle Bot added the channel: tlon Channel integration: tlon label Aug 10, 2026
@mislavivanda

Copy link
Copy Markdown
Contributor Author

Addressed the actionable findings at the new head:

  • P1 release metadata: rebased onto current main; plugin version, minHostVersion, compat.pluginApi, build.openclawVersion, and the install-catalog floor all moved to 2026.8.1.
  • P2 inventory: regenerated on current main — heading now reads 91.
  • P1 AWS SDK peer: root cause was extensions/tlon's exact @aws-sdk/[email protected] pin, which the shared dedupe applied to @daytona/sdk's subtree while @aws-sdk/lib-storage resolved to 3.1102.0 (peer ^3.1102.0). Bumped tlon's client-s3/s3-request-presigner pair to 3.1106.0 in lockstep; the lock now resolves [email protected](@aws-sdk/[email protected]). tlon's suite (279 tests) and typecheck-all are green.
  • Real behavior proof: after-fix live E2E output and a redacted transcript of the remote sandbox behavior (create/seed, exec with exit codes, binary round trip, adoption, deletion, zero leftovers) are now in the PR body.
  • Stored data model flag: the launcher payload is transient per-exec (0600, deleted at read + finalizeExec fallback) — no persisted state, no migration surface.

On the distribution question: the in-repo external-official shape (matching @openclaw/openshell-sandbox and @openclaw/mxc-sandbox) follows the maintainer invitation from Slack ("open to a PR where Daytona could be used as a sandbox backend"). Happy to convert to a separately hosted ClawHub plugin if maintainers prefer that direction — flagging for an owner decision.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@mislavivanda
mislavivanda marked this pull request as ready for review August 10, 2026 13:54
@mislavivanda
mislavivanda requested a review from a team as a code owner August 10, 2026 13:54
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/daytona/package.json
  • extensions/tlon/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes are blocked

OpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph.

Detected dependency graph changes:

  • pnpm-lock.yaml changed.
  • extensions/daytona/package.json changed dependencies, devDependencies, name, version.
  • extensions/tlon/package.json changed dependencies.

Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:

  • extensions/daytona/package.json changed dependencies, devDependencies, name, version.
  • extensions/tlon/package.json changed dependencies.

Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed.

To remove lockfile changes, restore them from the target branch:

git fetch origin
git checkout 'origin/main' -- 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git push

If this PR intentionally needs a dependency graph change, ask a repository admin or member of @openclaw/openclaw-secops to comment:

/allow-dependencies-change

The action will approve the current head SHA (2379d9b55a2c5163cabe4d9c5aad5648b7657706) when it reruns. A later push requires a fresh approval.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 10, 2026
@mislavivanda

Copy link
Copy Markdown
Contributor Author

Addressed both remote-command lifecycle findings at the new head:

  • [P1] cancellation: runShellCommand now honors the caller's AbortSignal — pre-aborted calls reject before any sandbox contact, and in-flight aborts reject promptly while the uncancellable toolbox call stays bounded by the configured API timeout.
  • [P2/medium] staging lifecycle: staged transport files (/tmp/openclaw-in/out/err-*) and the workspace seed tar are now removed best-effort whenever an operation fails or aborts, so nothing outlives a failed operation inside the persistent sandbox. Success-path cleanup remains inside the wrapped command itself.

Both paths carry regression tests (pre-aborted, in-flight abort, toolbox transport failure, seed-tar transport failure), and the live E2E scenarios were re-run green after the change.

On the dependency-graph guard: this PR inherently introduces the plugin's dependency graph (plugin-local @daytona/sdk + zod, exact-pinned) plus the tlon client-s3/s3-request-presigner lockstep bump that resolves the previously flagged lib-storage peer mismatch. Requesting authorization for the current head: could an admin/secops member comment /allow-dependencies-change once CI settles?

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@mislavivanda
mislavivanda force-pushed the feat/daytona-sandbox-backend branch from 96340f0 to dcd32fe Compare August 10, 2026 16:12
@mislavivanda

Copy link
Copy Markdown
Contributor Author

Pushed two follow-ups:

  • knip: declared src/daytona-exec-launcher.mjs as a workspace entry (it is copied to dist and spawned as a child process, never imported) — fixes the check-dependencies unused-file failure. Same pattern as mxc's spawn launcher.
  • manifest: regenerated configSchema after the SecretRef schema gained the store source variant on main; the schema-parity test is green again.

On the remaining red checks — verified main-owned, not from this PR (reproduced on a clean detached upstream/main checkout at c12d3d7a050 with a fresh install):

  • check-plugin-sdk-api-baseline fails on clean main (provider-catalog-runtime baseline drift, 34 JSONL lines)
  • test/scripts/test-projects.test.ts fails on clean main (same failure as checks-node-compact-small-2)
  • check-test-types errors are in test/scripts/package-acceptance-workflow.test.ts (untouched here)
  • checks-windows-node-test fails in src/media/local-media-path.windows.test.ts (untouched here)

dependency-guard remains blocked by design — this PR inherently introduces the plugin's dependency graph (plugin-local @daytona/sdk + zod, exact-pinned) plus the tlon client-s3/s3-request-presigner lockstep bump resolving the earlier lib-storage peer finding. Could an admin/openclaw-secops member comment /allow-dependencies-change for this head once it settles?

Note: the previous @clawsweeper re-review (15:11 UTC) appears stuck at "Command router queued" with no dispatch — re-requesting on the new head.

@clawsweeper re-review

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Addressed both actionable ClawSweeper findings at final head 2944c5e5915:

  • PTY signal cleanup is now awaitable at connection, input, and wait boundaries, so main() cannot exit before killPtySession settles. The controlled race test proved red before the fix (launcher resolved 0 while kill was pending) and now passes with signal exit 143 only after kill completion.
  • clawhub:@openclaw/daytona-sandbox is declared in both the package install metadata and official catalog, retaining npm as the intentional default.

Proof: Daytona 66 passed/1 skipped; official catalog 82 passed; ClawHub publication 61 passed; release planning 37 passed; extension test types, oxlint, oxfmt, and diff checks pass. Final structured reviews are clean for both commits.

@joshavant please repost /allow-dependencies-change for this exact head.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Final head is now c40de879030. This closes the remaining PTY EOF path: pipe-open stdin end is forwarded as terminal EOT, matching the established MXC PTY behavior, so commands waiting for EOF can terminate.

Proof: regression failed red before the fix; Daytona 67 passed/1 skipped; extension source/test typechecks, lint/boundary guards, formatting, diff checks, and final structured review are green. Direct @daytona/[email protected] types confirm PtyHandle.sendInput accepts string | Uint8Array.

@joshavant please repost /allow-dependencies-change for this exact head.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Dependency Guard confirmed the prior approval was invalidated by the final EOF commit and is now the only admission blocker for CI. @vincentkoc or @joshavant, please post /allow-dependencies-change for exact head c40de879030.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

ClawSweeper's two 2944c5e findings are now closed at final head 2379d9b55a2:

  • PTY stdin writes use one promise queue, so terminal EOT cannot overtake the final data chunk. The ordering regression proved red (3 sends while data was pending) before green.
  • docs/gateway/config-agents.md now lists Daytona and routes its settings to plugins.entries.daytona.config and the Daytona guide.

Proof: Daytona 67 passed/1 skipped; extension source/test typechecks, lint/boundary guards, docs config examples (1,207 validated), MDX, 6,669 internal links, formatting, diff checks, and structured review are green.

@vincentkoc or @joshavant, please post /allow-dependencies-change for exact head 2379d9b55a2.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

The exact-head ClawSweeper run for 2379d9b55a2 completed after all code/docs findings were fixed, but generated a close recommendation that was skipped only because merge-risk: security-boundary is protected. Patrick's earlier distribution decision was not treated as official sponsorship.

@vincentkoc (or @steipete), please explicitly confirm that Daytona should ship as an in-repo external official plugin for v1. Separately, @vincentkoc / @joshavant / @steipete, please post /allow-dependencies-change for this exact head.

@Patrick-Erichsen
Patrick-Erichsen merged commit 3a5cb38 into openclaw:main Aug 27, 2026
472 of 476 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Folks we use crabbox for our cloud services and Daytona is already fully supported there. This adds 5k LOC of duplicationl. Will revert.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
)

* feat: @openclaw/daytona-sandbox inital version

Signed-off-by: Mislav Ivanda <[email protected]>

* feat: plugin config params extended

Signed-off-by: Mislav Ivanda <[email protected]>

* feat: implement ClawSweeper review notes

Signed-off-by: Mislav Ivanda <[email protected]>

* fix(daytona): honor abort signals and clean up remote staging on failure

Signed-off-by: Mislav Ivanda <[email protected]>

* fix(daytona): register launcher as knip entry and refresh manifest schema

Signed-off-by: Mislav Ivanda <[email protected]>

* fix(daytona): cancellable session transport and auto-stopped sandbox restart

Signed-off-by: Mislav Ivanda <[email protected]>

* fix(daytona): deny egress by default and arm launcher cleanup before startup

Signed-off-by: Mislav Ivanda <[email protected]>

* fix(daytona): stop cancelled startup before submission

* test(daytona): satisfy deferred race lint

* test(release): update plugin publisher inventory

* fix(daytona): close provisioning and PTY cleanup gaps

* test(daytona): type PTY launcher mock

* fix(acpx): avoid promise-returning line handler

* fix(daytona): await PTY signal cleanup

* fix(daytona): declare ClawHub install route

* fix(daytona): forward PTY stdin EOF

* fix(daytona): serialize PTY input

* docs(daytona): document sandbox backend config

---------

Signed-off-by: Mislav Ivanda <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554
steipete added a commit that referenced this pull request Aug 28, 2026
* fix(sandbox): revert Daytona cloud sandbox plugin

Revert 3a5cb38 in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts #121554

* test(macos): verify SIGPIPE suppression without reader races

Concurrent preforked children can retain a pipe reader after the local handle closes. Assert the owned kernel flag before and after the real helper instead, and defer both handle closes. Keep the worker broken-pipe behavior test unchanged.

* test(ui): capture safe config readback failure diagnostics

* fix(ui): preserve tooltip trigger accessible names

* test(browser): trace bootstrap navigation recovery

Add bounded, payload-free fixture observations for the Linux bootstrap CI timeout. Preserve the original action order, access controls, assertions and timeouts; no browser runtime behavior changes.

* fix(ui): refresh tooltip names on ARIA changes

Observe aria-hidden mutations under the active tooltip trigger so revealed labels replace injected hint names. Cover descendant and nested-subtree hide/reveal/hide transitions with real role/name interactions.

* fix(deps): retain reverted Tlon handler resolution

Restore the exact handler package and snapshot needed by the intentional Tlon rollback after main pruned its last other caller. Frozen install and production audit resolve the complete graph without changing versions or guards.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
* fix(sandbox): revert Daytona cloud sandbox plugin

Revert 14fd4bd in full, including its
plugin, documentation, catalog, dependency, and incidental test changes.

Keep the existing Daytona support through Crabbox. The separate sandbox
backend duplicates provider ownership and lacks the workspace-transfer
semantics needed for large managed repositories.

Reverts openclaw#121554

* test(macos): verify SIGPIPE suppression without reader races

Concurrent preforked children can retain a pipe reader after the local handle closes. Assert the owned kernel flag before and after the real helper instead, and defer both handle closes. Keep the worker broken-pipe behavior test unchanged.

* test(ui): capture safe config readback failure diagnostics

* fix(ui): preserve tooltip trigger accessible names

* test(browser): trace bootstrap navigation recovery

Add bounded, payload-free fixture observations for the Linux bootstrap CI timeout. Preserve the original action order, access controls, assertions and timeouts; no browser runtime behavior changes.

* fix(ui): refresh tooltip names on ARIA changes

Observe aria-hidden mutations under the active tooltip trigger so revealed labels replace injected hint names. Cover descendant and nested-subtree hide/reveal/hide transitions with real role/name interactions.

* fix(deps): retain reverted Tlon handler resolution

Restore the exact handler package and snapshot needed by the intentional Tlon rollback after main pruned its last other caller. Frozen install and production audit resolve the complete graph without changing versions or guards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: tlon Channel integration: tlon dependencies-changed PR changes dependency-related files docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: acpx gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants