Terminal

Run commands in an interactive shell next to your chat. Each terminal is a real shell session that starts in the session's folder (its worktree, if the session runs in one), so commands run against the same files the agent is working with. In a session without a workspace, it starts in your home folder.

Working with the agent

The terminal is yours to drive, but it's connected to the chat:

  • The agent can open a terminal for you, starting in the workspace folder, for you to work in. It won't type or run commands in it (the agent runs its own commands through a separate, permission-gated shell).
  • The agent can read what your terminals print, such as a dev server or test watcher you're running, to help you spot issues and offer assistance.

Work in multiple terminals

Open more than one terminal at a time — each is numbered and runs independently, so a command in one doesn't affect another. The tab title updates to show the command that's currently running.

Select and copy

Drag to select text, double-click to select a word, or triple-click to select a line. Selections are highlighted in every theme. Press Cmd+C (macOS) or Ctrl+Shift+C (Windows/Linux) to copy the selection. Copying doesn't take Ctrl+C away from the shell: it still stops the running command.

Keyboard shortcuts

ActionmacOSWindows/Linux
Copy selectionCmd+CCtrl+Shift+C
Select allCmd+ACtrl+Shift+A
Clear screen and scrollbackCmd+K—
Move to start / end of lineCmd+← / Cmd+→—
Move back / forward one wordOption+← / Option+→—
Delete to start of lineCmd+Backspace—
Scroll to top / bottomCmd+Home / Cmd+EndShift+Home / Shift+End
Scroll one page up / downCmd+Page Up / Cmd+Page DownShift+Page Up / Shift+Page Down

Cmd+K also clears the terminal's saved scrollback, so it stays cleared after a reload. It has no effect while a full-screen program such as vim or less is running.

Sessions that survive reloads

A terminal keeps its scrollback and stays running across window reloads. If the view reloads, it reconnects to the same session rather than starting over, so a long-running command keeps going. Closing a terminal, though, ends its session and stops whatever it's running.