Reset terminal
terminal_resetReset a terminal session by clearing its buffer and scrollback, or hard-reset to kill and respawn the shell while preserving env vars, cwd, and history by default.
Instructions
Wipe the terminal buffer and scrollback. By default the shell process keeps running (env vars, cwd, history all preserved). Pass hardReset: true to kill the current shell and spawn a brand-new one — anything mid-execution gets killed. When hardReset: true, you can also override cols, rows, shell, and cwd. In a session created with command, a hard reset runs that command again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | hardReset only: working directory for the new shell. | |
| cols | No | hardReset only: spawn at this width. | |
| rows | No | hardReset only: spawn at this height. | |
| shell | No | hardReset only: shell command (default $SHELL). | |
| hardReset | No | Kill + respawn the shell instead of just clearing the buffer. Default false. | |
| sessionId | Yes | Numeric id of the session to target. Get one by calling terminal_create. Use terminal_list to enumerate currently-known ids. |