Skip to content

Search titles and text across the docs.

The terminal

Open a shell in the chat's checkout, on the computer that runs the chat, as a drawer under the chat or a tab in the right panel.

Where in StudioChat → ⌘J

Updated View as markdown

The terminal runs your own shell in the chat's checkout, on the computer that runs the chat. Use it to run the app, try a command the agent suggested or fix something by hand. It is a shell for you; the agent runs its own commands separately.

Open it

Where in StudioChat → ⌘J

  • Press ⌘J (Ctrl+J on Linux) in a code chat to show or hide the terminal drawer under the conversation. The chevron at the right of its tab bar, Hide terminal, closes it too.
  • Or open the right panel and choose Terminal from Open a surface or the + at the end of the panel's tabs.

The drawer opens with one terminal and puts the cursor in it. Drag its top edge to change its height. The shortcut is Toggle terminal in Settings → Shortcuts, where you can change it. The terminal belongs to the code workspace; chats in the chats workspace do not have one.

Where it runs

  • Folder: the chat's checkout, including a worktree. A chat without a folder opens in your home folder.
  • Shell: the login shell set in SHELL on that computer, else zsh on macOS and bash on Linux.
  • Computer: the one that runs the chat. For a chat on a server or another Mac, the terminal opens there, and this computer must be approved for that computer. See Approved devices and signatures.

If the chat's folder is not there on that computer, the terminal says Session working directory is unavailable.

Tabs

  • + opens another terminal. Tabs are named Terminal 1, Terminal 2 and so on, or by the title the running program sets, such as the folder or the command.
  • Drag a tab to reorder it. A middle click closes it.
  • Each chat keeps its own terminals. Switching chats and coming back finds them still running; hiding the drawer does not stop them.
  • When the program exits, the tab shows a line such as [process exited 0]. Open a new tab to carry on.

Copy and paste

KeysWhat it does
⌘CCopy the selection. With nothing selected, keys go to the program as usual.
⌘VPaste.
Drag, double click, triple clickSelect text, a word, or whole lines.

On Linux use Ctrl+Shift+C and Ctrl+Shift+V. Plain Ctrl+C still interrupts the running program.

When it does not work

MessageWhat to do
Select a chat to open a terminalOpen a chat first. The terminal always belongs to one.
Session working directory is unavailableThe chat's folder is missing on the computer that runs it. Check the checkout in Projects and checkouts.
Terminal input could not be sent. Open a new terminal to continue.Open a new tab with +.