Open Terminal Session
open_terminal_sessionLaunch a new persistent terminal session in a chosen shell and working directory, enabling independent command execution under a unique name.
Instructions
Starts a new, persistent shell process attached to its own pseudo console, and registers it under a name you choose.
Args:
name (string): unique session name, defaults to "default"
shell ('pwsh' | 'powershell' | 'cmd'): defaults to 'pwsh'. Falls back to 'powershell' automatically (with a warning in the result) if pwsh.exe is not installed.
cwd (string, optional): starting directory
You do not need to call this before write_to_terminal - writing to the "default" session name auto-creates it. Use this tool explicitly when you want a second, independently named session (e.g. run a dev server in "server" while running git commands in "git"), or want to pick the shell/starting directory yourself.
Errors if a session with that name is already open - close it first or pick a different name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Starting directory for the session, e.g. "C:\\src\\myproject". Defaults to the user's home/profile directory. | |
| name | No | Unique name for this session, e.g. "build" or "git". Defaults to "default". | default |
| shell | No | Which shell to start. "pwsh" is PowerShell 7+, "powershell" is the Windows-builtin 5.1, "cmd" is classic cmd.exe. | pwsh |