set_terminal_lifecycle
Kill, keep alive or clear history of a terminal.
Only changes the in-memory session record.
- Tool name
- set_terminal_lifecycle
- Group
- Terminal and Python sandbox
- Risk
- low
- Needs approval
- never
- Approval rule
- No approval.
- Allowed in scheduled jobs
- No
- Default
- on
Parameters
| Name | Type | Required | Default | Meaning | Limits |
|---|---|---|---|---|---|
| terminal_id | string | Yes | Id of a terminal session. Omit to use the first one. | ||
| action | string | Yes | What to do. | One of: kill, keep_alive, reset_history. |
Returns
A confirmation.
Example (made up for this page)
{
"terminal_id": "demo",
"action": "kill"
}Terminal t1 killedSide effects
- Marks a terminal dead or clears its history.
How it can fail
| When | What the agent sees |
|---|---|
| Unknown terminal | Terminal t9 not found |
| Unknown action | Unknown action ... |
See also:Terminal and Python sandbox tools
Checked against the source at commit f4fd89f on 29 Oct 2026. Everything here is merged on the main branch; no release has been tagged yet. The source is private, so these pages are the public description.