start
Launch a command in a detached, persistent terminal session and get its session ID for later interaction. Configure working directory, environment variables, and terminal size as needed.
Instructions
Spawn a program in a new detached, persistent session and return its id.
The session survives across tool calls (a localhost-only daemon owns the live
PtySession). cmd is the command line to spawn, e.g. "python3" or
"lazygit". cwd and env configure only the controlled child process.
Returns {"ok", "sid"} on success. Use the returned sid for every other tool.
Server-side limits (violations return an error): at most 8 concurrent
sessions by default (tunable via SMARTCLI_MAX_SESSIONS); sid must be 1-64
chars matching [A-Za-z0-9][A-Za-z0-9_.-]*; env keys must be valid
identifiers and may not start with SMARTCLI_TUI_; cwd must be an existing
directory; terminal size is capped at 1000 cols x 500 rows (100000 cells).
Note: env values pass through the process command line briefly (visible
in ps) — avoid secrets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | ||
| cwd | No | ||
| env | No | ||
| sid | No | ||
| cols | No | ||
| rows | No |