Run on Plue
run-on-plue executes a Smithers workflow script on Plue infrastructure instead of the local machine. It uses the <Sandbox> provider seam with createPlueSandboxProvider, and the provider shells through the plue CLI so Plue owns workspace lifecycle, authentication, quotas, and Freestyle VM access.
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 that file, 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 the workspace is running and has an SSH command. - Connects over SSH in batch mode.
- Installs Bun if missing, then installs
@anthropic-ai/claude-codeand@openai/codexwhen those CLIs are absent. - Seeds Claude and Codex auth via
plue workspace exec --seed-agent-auth claude,codex. - Ships a small remote project containing the child workflow source,
agents.ts,package.json, andinput.json. - Runs
smithers-orchestrator 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. Local Plue uses
SMITHERS_FEATURE_FLAGS_WORKSPACES=true. - The Plue server must be configured for real Freestyle workspaces, including the Freestyle API key required by that server (
SMITHERS_FREESTYLE_API_KEYor the environment wiring used by your Plue deployment). - The repo passed as
repomust exist in Plue and be accessible to the authenticated user. - Claude auth must be available locally. The preferred path is Claude Code subscription OAuth in the OS credential store;
ANTHROPIC_API_KEYonly works when that key has usable API billing. - Codex auth must be available locally. The preferred path is
~/.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 review/approval interaction before applying file changes. The v1 Plue provider is non-interactive: it runs the remote child, maps the remote result into the parent run, and does not open a human approval loop inside the VM.
Design child workflows so they return structured output or artifacts. If you need to inspect the remote VM after a failure, run with keepWorkspace: true, then use plue workspace view or plue workspace ssh to connect.
Claude and Codex bootstrap
Remote workspaces may not have all agent CLIs preinstalled. The provider’s bootstrap is idempotent:bunis installed from the official installer when missing.claudeis installed withbun i -g @anthropic-ai/claude-codewhen missing.codexis installed withbun i -g @openai/codexwhen missing.~/.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 that exports both ClaudeCodeAgent and CodexAgent, so child workflows can import or define tasks that use either CLI once bootstrap completes.