Imported from rodrigorm/opencode-sandbox (
AGENTS.md). Install upstream withnpx skills add rodrigorm/opencode-sandbox. Copyright stays with the author.
Instructions for AI Agents
Project Overview
OpenCode sandbox plugin as a standalone TypeScript project (Bun).
| Directory | Purpose |
|---|---|
src/ |
Plugin entry (src/index.ts) and lifecycle code (src/sandbox/) |
bin/ |
sandboxctl CLI used by the /sandbox command |
command/ |
Slash-command definition |
docs/ |
Architecture and operations |
history/ |
Design history |
Commands
| Command | Purpose |
|---|---|
bun test ./src/sandbox |
Run the sandbox suite |
bun run typecheck |
Type-check the project |
shellcheck bin/sandboxctl |
Lint the CLI wrapper |
Guidelines
- Sandbox Architecture - Read before changing lifecycle, providers, workspace routing, or remote access
- Sandbox Operations - Read when diagnosing sessions, drift, leaked resources, or cleanup
- Sandbox Agent Plan - Read when planning recovery, inspection, or interface work
Gotchas
- Source moved here with history from a dotfiles checkout; remote-side paths
(
<remote>/.config/opencode/sandbox/) are the remote OpenCode layout, not this repo's. - Never print secrets;
SANDBOX_CONFIGor environment overrides carry them. - Fail-closed ownership:
--forcenever bypasses ownership or unknown state.