Skip to content

[sandbox-cli] Add stdin, output, domain, and user controls - #392

Open
erulkey wants to merge 2 commits into
codex/cli-command-lifecyclefrom
codex/cli-sdk-parity-followup
Open

erulkey wants to merge 2 commits into
codex/cli-command-lifecyclefrom
codex/cli-sdk-parity-followup

Conversation

@erulkey

@erulkey erulkey commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

The SDK can pipe input to a command, keep detached stdin open, read one output stream, resolve a published port, and manage Linux users and groups. The CLI could not call those operations directly. This adds matching commands and examples to the repository Sandbox skill.

For a foreground command, printf 'hello\n' | sandbox exec --stdin my-sandbox -- cat forwards input, streams output, and returns the command's exit code in one invocation. For a command that needs input later, sandbox exec --detach --stdin prints its ID; sandbox commands write sends bytes from another CLI process, close-stdin sends EOF, and output --stream stdout|stderr|both reads its output. sandbox domain returns a published port's URL. sandbox users and sandbox groups create users and shared groups, run as a user, and change membership.

The command controls use the current running session so an old command ID cannot silently target a resumed session. User and group commands call the SDK methods directly. Generated help and skills/sandbox/SKILL.md include the new forms.

This PR builds on vercel/sandbox#391 and should merge after it. Public guidance is in vercel/front#91668; that docs PR remains gated on stable CLI publication.

Verification: 231 CLI tests passed across 29 files, typecheck and build passed, and generated help and diff checks passed. A live playground probe verified one-command stdin through sandbox exec and sandbox users exec, then removed the green throwaway sandbox. An earlier separate-process probe wrote two stdin chunks, closed input, read stdout and stderr separately, resolved a published port, and verified user/group membership changes. Independent read-only reviews found no P0/P1/P2 issues.

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sandbox Ready Ready Preview, v0 Oct 17, 2026 12:17am UTC
sandbox-cli Ready Ready Preview, v0 Oct 17, 2026 12:17am UTC
sandbox-sdk-ai-example Ready Ready Preview, v0 Oct 17, 2026 12:17am UTC
workflow-code-runner Ready Ready Preview, v0 Oct 17, 2026 12:17am UTC

This branch was successfully deployed

4 active deployments
Preview – sandbox — 7738e97e Deployed Oct 17, 2026 by vercel[bot]
Preview – sandbox-sdk-ai-example — 7738e97e Deployed Oct 17, 2026 by vercel[bot]
Preview – workflow-code-runner — 7738e97e Deployed Oct 17, 2026 by vercel[bot]
Preview – sandbox-cli — 7738e97e Deployed Oct 17, 2026 by vercel[bot]
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.

1 participant