Skip to main content
Open a shell inside a runtime, stream its output, disconnect, and attach again later with the scrollback still there. This is the programmatic counterpart to the web terminal. Use it when an agent needs to drive an interactive process:
  • A REPL that holds state between inputs.
  • An installer or migration tool that asks questions part way through.
  • A full-screen program, a pager, or anything that behaves differently in a terminal.
  • A long-running foreground job you want to interrupt with Ctrl-C.
Programs see a terminal, so line editing, job control, color, and resize all work.
Start a shell, send keystrokes, read the output, drive it, or resize and stop it.

Session object (PtySession)

How many shells you can open

  • 8 concurrent shells per runtime. Creating a ninth fails. Stop shells you no longer need.
  • 256 KB of scrollback per shell. Older output is discarded as new output arrives, so a shell that has been unattended replays only its recent tail.
  • Exited shells are kept briefly so you can read the final output and exit code, then removed automatically.
  • Only permitted shells can be launched. The shell argument is checked against that list.

Endpoints