· ai-devtools

Vercel Sandbox supports stdin in TypeScript and Python SDKs

Developers can now pipe input directly into running commands within Vercel Sandbox via standard input (stdin).


This capability opens doors for interacting with stdio MCP servers, like agent-browser, or feeding data to other command-line applications while they are active.

Within the TypeScript SDK, enabling this requires setting both `stdin: true` and `detached: true` when calling `runCommand()`.

To transmit data, developers should utilize `writeStdin()`, ensuring to call `closeStdin()` once the input transfer is complete.

Alternatively, one can configure stdin to accept a Node.js readable stream, such as `process.stdin`. The SDK handles forwarding this stream's data and terminates the command's standard input when the stream concludes.

For those working with the Python SDK, the process involves setting `stdin=subprocess.PIPE`. Input is then sent using `server.stdin.send()`. After sending, calling `communicate()` closes stdin, gathers any remaining output, and awaits the process's exit.

If a command requires all its input at once, the Python SDK offers a direct route by passing the input straight into `run_process()`.

Further details on implementing these features can be found within the Sandbox documentation.

Related coverage

Also worth reading

  1. next.js 16.5.0-canary.35 released
  2. next.js 16.5.0-canary.33 released
  3. angular 22.2.4 released
  4. LibreOffice's 'no AI' stance meets LLM-assisted code
  5. “Urgency is an inherently subjective call”: Anthropic tells TNS how it grades Claude Duet