Run on Plue
run-on-plue executes a Smithers workflow script on Plue infrastructure instead of locally, via the <Sandbox> provider seam and createPlueSandboxProvider, which shells through the plue CLI so Plue owns workspace lifecycle, authentication, quotas, placement, and execution through its self-hosted Microsandbox plane. Use it when a child workflow needs a real Plue workspace: a repo-bound VM with SSH, git, jj, Node, network egress, and bootstrapped Claude Code and Codex CLIs.
What it does
The workflow lives at.smithers/workflows/run-on-plue.tsx: it accepts a path to any Smithers .tsx workflow, reads it, and sends it to a Plue-backed sandbox provider.
The provider:
- Creates a Plue workspace with
plue workspace create --repo <owner>/<repo>. - Polls
plue workspace view --format jsonuntil running with an SSH command. - Connects over SSH in batch mode.
- Installs Bun, then the Claude Code and Codex CLIs, when missing.
- Seeds Claude and Codex auth for the remote CLIs.
- Ships a small remote project containing the child workflow source,
agents.ts,package.json, andinput.json. - Runs
smthrs upin the workspace and reads the remote run result back over SSH. - Deletes the workspace unless
keepWorkspaceis true.
Requirements
plueCLI installed and authenticated on the host running Smithers. Verify withplue auth status.- The target Plue server must have workspaces enabled (
SMITHERS_FEATURE_FLAGS_WORKSPACES=truelocally) and be configured for real workspaces withSMITHERS_SANDBOX_PROVIDER=microsandboxplus an authenticated Microsandbox controller. - The repo passed as
repomust exist in Plue and be accessible to the authenticated user. - Claude and Codex auth must be available locally: prefer Claude Code subscription OAuth in the OS credential store (
ANTHROPIC_API_KEYonly works with usable API billing) and~/.codex/auth.json(OPENAI_API_KEYis only a fallback for setups where the Codex CLI honors API-key auth). - If
plueis not onPATH, setPLUE_BINor passplueBinin the workflow input.
Run a workflow remotely
Run the included demo child workflow:Use the provider directly
run-on-plue is the default wrapper, but workflows can pass the provider object to <Sandbox> directly:
Non-interactive caveat
KeepreviewDiffs={false} for Plue runs: <Sandbox> defaults to fail-closed diff review, which expects a local approval interaction before applying file changes, but the v1 Plue provider is non-interactive. It runs the remote child, maps the result into the parent run, and opens no human approval loop inside the VM.
Design child workflows to return structured output or artifacts. To inspect the remote VM after a failure, run with keepWorkspace: true and connect with plue workspace view or plue workspace ssh.
Claude and Codex bootstrap
Remote workspaces may not have all agent CLIs preinstalled, so the provider bootstraps them idempotently:- When missing,
buninstalls from the official installer, andclaude(bun i -g @anthropic-ai/claude-code) andcodex(bun i -g @openai/codex) install via Bun. ~/.bun/binis prepended toPATHfor remote commands.plue workspace exec --seed-agent-auth claude,codexstages Claude Code and Codex credentials before the child workflow runs.
agents.ts exports both ClaudeCodeAgent and CodexAgent, so child workflows can use either CLI once bootstrap completes.