Skip to content

blog(ai): Run any coding agent in a sandbox, with one chat() call#1016

Merged
AlemTuzlak merged 2 commits into
mainfrom
blog/sandbox-harnesses
Jun 30, 2026
Merged

blog(ai): Run any coding agent in a sandbox, with one chat() call#1016
AlemTuzlak merged 2 commits into
mainfrom
blog/sandbox-harnesses

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Announces the TanStack AI sandbox layer + acpCompatible.

Adds a blog post (src/blog/run-coding-agents-in-a-sandbox.md, library: ai) covering:

  • The two-axis model: harness (Claude Code, Codex, OpenCode, Grok Build) × provider (local, Docker, Daytona, Vercel, Cloudflare), all driven by one chat() + withSandbox().
  • acpCompatible — the openaiCompatible of coding agents: plug in any ACP agent (gemini --acp, Cursor, Goose, Pi, …) with no dedicated package.
  • What's shared for free: secrets, provisioning, streaming, session resume, guardrails.

All code samples are grounded in the real API. Header image added at public/blog-assets/run-coding-agents-in-a-sandbox/header.png.

Note: pairs with the sandbox feature work in TanStack/ai#774 — hold publish/merge until that lands and releases.

Summary by CodeRabbit

  • Documentation
    • Added a new blog post about running coding agents in an isolated sandbox.
    • Explains how to connect different agent setups through a simple one-import integration.
    • Includes guidance for working with agents that support the Agent Client Protocol, plus a diagram and quick-start section.

Announce the TanStack AI sandbox layer + acpCompatible: coding-agent harnesses
(Claude Code, Codex, OpenCode, Grok Build, or any ACP agent) run inside isolated
sandboxes across local/Docker/Daytona/Vercel/Cloudflare and stream back through
chat().
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 20f4860 Commit Preview URL

Branch Preview URL
Jun 30 2026, 01:54 PM

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new blog post (src/blog/run-coding-agents-in-a-sandbox.md) is added, covering how to run coding agents in an isolated sandbox via chat() and withSandbox(), two configuration axes (provider and harness), acpCompatible for ACP-based agents, built-in features, and a Mermaid flow diagram.

Changes

New blog post: coding agents in a sandbox

Layer / File(s) Summary
Full blog post
src/blog/run-coding-agents-in-a-sandbox.md
Adds frontmatter, problem framing, chat()/withSandbox() example, provider and harness axis documentation with code snippets, acpCompatible section, built-in features list with Mermaid diagram, and a "Try it" conclusion.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • KevinVandy

Poem

🐇 Hop into the sandbox, safe and snug,
One import to rule them, snug as a bug.
The agent runs free in its isolated den,
Streams back the edits again and again.
Any sandbox, any agent — one little hug! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: a new blog post about running coding agents in a sandbox with one chat() call.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blog/sandbox-harnesses

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KevinVandy

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/blog/run-coding-agents-in-a-sandbox.md (1)

116-120: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider array-based command or escaping note for the ACP example.

The command template literal builds a shell string: `pi --acp -m ${model} --cwd ${harnessCwd}`. If harnessCwd contains spaces, the resulting command splits incorrectly. Readers copying this pattern may hit a subtle bug.

Consider showing an array form (if the API supports it) or adding a brief note about shell escaping:

// If the API accepts an array of arguments instead of a shell string:
command: ({ model, harnessCwd }) => 
  ['pi', '--acp', '-m', model, '--cwd', harnessCwd],

Or add a inline comment warning about spaces in paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/blog/run-coding-agents-in-a-sandbox.md` around lines 116 - 120, The ACP
example in acpCompatible uses a shell-interpolated command string, which can
break when harnessCwd contains spaces. Update the command callback in the pi
example to use an argument-array form if supported, or add a clear note/comment
about shell escaping and quoting for model and harnessCwd so readers do not copy
a fragile pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/blog/run-coding-agents-in-a-sandbox.md`:
- Around line 116-120: The ACP example in acpCompatible uses a
shell-interpolated command string, which can break when harnessCwd contains
spaces. Update the command callback in the pi example to use an argument-array
form if supported, or add a clear note/comment about shell escaping and quoting
for model and harnessCwd so readers do not copy a fragile pattern.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 66639043-2354-4568-bdde-b9f781123e35

📥 Commits

Reviewing files that changed from the base of the PR and between 57c5060 and 20f4860.

⛔ Files ignored due to path filters (1)
  • public/blog-assets/run-coding-agents-in-a-sandbox/header.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • src/blog/run-coding-agents-in-a-sandbox.md

@AlemTuzlak AlemTuzlak merged commit 71bec61 into main Jun 30, 2026
7 checks passed
@AlemTuzlak AlemTuzlak deleted the blog/sandbox-harnesses branch June 30, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants