VCode home

Run a command from a code block

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

A bash code block in a reply carries a run control beside its copy button. One tap sends the block to the tab's shell pane and runs it there.

Why you would use it

The agent just gave you the command — npm test, the migration, the restart — and retyping it on a phone is where the typo happens. Copy-paste works, but it is two trips; this is one tap.

How to use it

  1. Find the bash block in the reply. The run control is the terminal-prompt mark (button.run) in the block's header bar, beside the copy icon. It appears once the fence has closed — while the answer is still streaming, with no closing fence yet, there is no control, so a tap can never run half a command.

    A bash block's header bar with the run mark beside the copy icon

  2. Tap it. The app switches to the shell pane and runs the block there.

What you see

Limits and known gaps