sandcastle

Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()

24 articles 4.9k View on GitHub ↗
24 articles
How AbortSignal Cancels Runs and Preserves Worktrees in Sandcastle

Learn how Sandcastle leverages AbortSignal to safely cancel agent sessions. Discover how it preserves worktrees with uncommitted changes, ensuring your work isn't lost.

deep-dive
May 24, 2026
How to Pass Environment Variables to a Sandcastle Sandbox Using the `env` Option

Learn how to pass environment variables to your Sandcastle sandbox using the env option. Easily inject key-value pairs to override repository and agent variables for custom sandbox behavior.

how-to-guide
May 24, 2026
How to Use the Parallel-Planner and Parallel-Planner-With-Review Templates in Sandcastle

Learn to use Sandcastle's parallel-planner and parallel-planner-with-review templates for parallel GitHub issue code management. Orchestrate plan, implement, review, and merge workflows.

how-to-guide
May 24, 2026
What Files Can Be Copied Using `copyToWorktree` in Sandcastle?

Learn what files and directories copyToWorktree in Sandcastle can copy from your host repository root, including single files configurations and scripts.

how-to-guide
May 24, 2026
How Does copyToWorktree Work in Sandcastle? Copy-on-Write Preloading Explained

Discover how Sandcastle's copyToWorktree uses copy-on-write semantics to efficiently clone host repository paths into worktrees. Learn about reflink support and fallback mechanisms.

internals
May 24, 2026
How to Configure SELinux Labels for Docker Mounts Using the `selinuxLabel` Option in Sandcastle

Master SELinux labels for Docker mounts in Sandcastle. Learn to use the selinuxLabel option with "z", "Z", or false for optimal security and context management. Secure your Docker sandbox.

how-to-guide
May 24, 2026
createWorktree vs createSandbox in Sandcastle: Key Differences Explained

Understand the key differences between createWorktree and createSandbox in Sandcastle. Learn how each function manages Git worktrees and sandbox execution for your projects.

deep-dive
May 24, 2026
How to Create a Reusable Sandbox with `createSandbox()` for Multiple Agent Runs in Sandcastle

Learn how to create a reusable sandbox with createSandbox() in Sandcastle for efficient multiple agent runs. Persist state and lifecycle for streamlined workflows.

how-to-guide
May 24, 2026
How to Use Completion Signals to Stop Sandcastle Agent Iterations Early

Learn how to use completion signals to stop Sandcastle agent iterations early and reduce token costs. Maximize LLM efficiency effortlessly.

how-to-guide
May 24, 2026
How Session Capture Works in Sandcastle Using `sandboxSessionStore`

Learn how session capture works in Sandcastle using sandboxSessionStore to extract, transfer, and persist AI agent session files for analysis. Understand the process clearly.

internals
May 24, 2026
How Session Capture Works in Sandcastle Using `hostSessionStore`

Discover how Sandcastle captures agent sessions with hostSessionStore. Learn how JSON-L session data is transferred and paths are rewritten for seamless host integration.

how-to-guide
May 24, 2026
How to Configure Idle Timeout for Agent Runs Using `idleTimeoutSeconds` in Sandcastle

Learn to configure agent run idle timeout in Sandcastle using idleTimeoutSeconds. Prevent silent agent abortions and control wait times effectively. Get the details now!

how-to-guide
May 24, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →