VCode home

Run shell commands in the tab

Agents: claude, codex, opencode · On: phone, desktop

Switch the tab from the agent to a terminal. It is a real shell on the machine, in this tab's folder, and it fills the screen where the transcript was. You type into it directly, as you would in a terminal app.

Why you would use it

You are on a phone and you want to run git status, start a dev server, read a build's output, or open vim or htop for a minute. You want it in the tab's own folder, without asking an agent to do it and hoping it does.

How to use it

  1. Tap Shell in the strip at the top (#send-modes, the chip with the >_ mark). The transcript is replaced by the tab's terminal (#panel), and the composer goes away: in Shell mode you type into the terminal itself. On a wide screen the terminal button in each pane's header switches that pane the same way: see terminal-split.

    The terminal filling the screen with ls, git status and a $ prompt, and the keypad under it.

  2. Tap the terminal to bring up the keyboard, then type a command and press Enter. On a phone or tablet, at a prompt you can tap inside the line to move the caret, select a word and type over it, or paste; see edit-the-command-line. On a computer with a mouse or trackpad the terminal works as VS Code's does: it takes the keyboard as soon as it opens, every key goes to the shell, and Alt-click (Option-click on a Mac) on the line moves the shell's cursor there.

    The terminal with "npm run dev" typed on the prompt line, before Enter.

  3. Read the output as it arrives. Scroll up with a finger or the wheel for earlier lines.

  4. On a touch screen the two-row keypad stays open in the bottom band. Tap a key for Tab, Esc, the arrows or ^C.

  5. To copy on a phone, hold a finger still on the terminal, outside the line you are typing, for half a second. A sheet opens with the output as plain text (#term-copy); select with the phone's own handles, or tap Copy all (#term-copy-all). On a desktop, select with the mouse and press Ctrl+C or Ctrl+Shift+C (Cmd+C on a Mac); with nothing selected Ctrl+C is ^C. Paste with Ctrl+V or Ctrl+Shift+V (Cmd+V), or right-click for the browser's menu.

    The SHELL sheet: "Select text to copy", a Copy all button, and the terminal's lines as plain text.

  6. Tap a URL or a host:port in the output. On a phone a card titled Link (#term-link) offers Copy (#term-link-copy) and Open (#term-link-open). On a desktop, Ctrl-click it (Cmd-click on a Mac) to open it in a new browser tab; hovering it says Follow link (ctrl + click).

    The Link card over the terminal, showing http://localhost:5173/ with Copy and Open.

  7. On a phone, swipe sideways on the terminal to move to the tab beside this one, as on the transcript. Shell mode stays with the tab you set it on: the tab you move to opens on its agent, unless you put that tab in Shell too. Swipe back and this tab is still in its shell. A tab in Shell slides in as its shell as you last saw it on this screen (an empty terminal if you have not opened it here yet), and its live terminal takes over when the swipe lands.

  8. Tap Agent in the same strip, the ✕ in the terminal's header (#panel-close, "Back to the agent"), or the phone's back button, to put this tab back on the agent.

What you see

Options and settings

Option Default What it changes
VCODE_SHELL_SESSION v-code-shell (v-code-shell-prod in the unit) Name of the tmux session the tabs' windows live in
VCODE_SHELL_COLS 120 Width the session is created at; a tab's window then takes the terminal's width
VCODE_SHELL_ROWS 40 Height the session is created at; a tab's window then takes the terminal's height

Limits and known gaps