Interface & Shortcuts
Interactive pw code runs in a full-screen terminal interface: a scrollable transcript on top, the message composer at the bottom, a permission-mode line, and a status line. This page covers the interface elements and every keyboard shortcut.
At rest, the bottom of the screen looks like this:
The Transcript
- Banner: The session opens with Parallel Works Code and the CLI version, followed by the workspace path and the platform host the session connects to.
- Streaming markdown: Responses stream in as the model generates them and are rendered as formatted markdown, including highlighted code blocks.
- Syntax-highlighted diffs: File edits are shown as diffs with syntax highlighting on the changed lines.
- Collapsed blocks and verbose mode: Long tool output collapses to a summary line. Press Ctrl+O to turn verbose mode on, which expands every block; the status line shows
verbosewhile it is on. Press it again to collapse them. - Todo list: When the agent tracks a todo list, it is pinned in its own panel. Press Ctrl+T to hide or show it.
- Jump to bottom: When you scroll up, a centered Jump to bottom (ctrl+end) ↓ pill appears; new output stops following until you return to the tail (or press Ctrl+R to re-enable following).
- Search: Press Ctrl+F and type to search the transcript; matches are highlighted, Enter/↓ and ↑ step between them, and Esc closes the search.
The mouse wheel always scrolls the transcript. Clicking on interface elements is off by default; enable the Mouse clicks option in /settings if you want clicks to select picker rows and toggle blocks. Set PW_CODE_MOUSE=false to turn off mouse tracking entirely, which leaves your terminal's own click-and-drag text selection working.
The Status Line
The two lines under the composer show:
- Permission line: the current permission mode, such as
⏵⏵ accept edits on (shift+tab to cycle), with a key hint on the right (for example? for shortcutsat an empty prompt). - Status line: on the left, the model with its reasoning effort and the workspace path. On the right:
<live>/<limit> ctx · ~$X: the size of the conversation the model sees now, against its context window, and the session's estimated cost. See Usage & Costs.alloc: <name>: the budget allocation, when one is set.no tools,tools unavailable, oremulated toolswhen tool calling is off or limited for the model.verbosewhile verbose mode is on./rcwhen remote control is on for the session.
While a goal is set, a ◎ /goal active (elapsed) or ◎ /goal paused indicator appears above the composer.
Keyboard Shortcuts
Press ? at an empty prompt to toggle the shortcuts overlay in the session itself.
| Key | Action |
|---|---|
| Enter | Send the message. See Typing While the Agent Works. |
| Shift+Enter | Insert a newline (Alt+Enter or Ctrl+J on terminals that cannot distinguish it). |
| ↑ / ↓ | Recall earlier prompts, including from previous sessions in the same workspace. While the agent is working, ↑ at an empty prompt pulls back your newest queued message for editing. |
| ↓ (past the newest entry) | Move into the agent switcher when subagents are running; Ctrl+N/Ctrl+P also move through it. See The Agent Switcher. |
| ← (at an empty prompt) | Open the agents list. |
| Esc | Close an open overlay; interrupt the running turn, ! command, or /compact. At the prompt, press once to arm and again to clear the typed text. |
| Esc Esc (at an empty prompt) | Open /rewind to restore an earlier checkpoint. See Rewinding. |
| Ctrl+C | Interrupt the running turn or /compact; with text typed, clear the composer. At an empty prompt, press twice to quit. |
| Ctrl+D | Quit (at an empty prompt). |
| Shift+Tab | Cycle the permission mode: read-only → accept-edits → bypass-permissions → plan. |
| ? | Toggle the shortcuts overlay (at an empty prompt). |
| / | Open the slash command palette. Tab completes the highlighted command. |
| @ | Reference a file or a running subagent. See File and Agent References. |
| : | Open the emoji picker; keep typing a name to filter. |
| ! | Enter shell mode (see below). |
| Ctrl+O | Toggle verbose mode, expanding or collapsing every tool block. |
| Ctrl+T | Hide or show the todo list. |
| Ctrl+R | Toggle whether the transcript follows new output. In the model picker: refresh the model list. |
| Ctrl+F | Search the transcript. |
| Ctrl+V | Paste: attaches a clipboard image when one is present, otherwise pastes text. |
| Ctrl+L | Clear and redraw the screen. |
| PgUp / PgDn | Scroll the transcript half a screen. |
| Ctrl+Home / Ctrl+End | Jump to the top / bottom of the transcript while scrolled. |
Pickers and prompts have their own keys, shown in a hint line at their bottom. The plan approval prompt is covered in Plan Mode, the session picker in Sessions & Resume, and the agents list in Remote Control & Agents.
Typing While the Agent Works
You can keep typing while a turn runs:
- Plain text steers the running turn. It is delivered to the agent at its next step, so you can correct course without stopping it.
- Slash commands and
!commands queue and run when the turn ends, except the commands listed in Commands While the Agent Is Working.
Interrupting a turn with Esc or Ctrl+C stops only that turn: anything queued behind it is kept and still sent. When nothing is queued, your last message is restored to the composer so you can edit and resend it.
Quitting pw code does not stop a running turn. The terminal is a client of a background service that hosts your sessions, so exiting only disconnects: the agent finishes its work, and the exit message prints the command to reconnect. See The Background Daemon.
Shell Mode
Start a message with ! to run a shell command yourself. The composer's prompt glyph switches to ! and a hint appears: enter runs it locally; output is added to the conversation.
The command runs in your login shell ($SHELL, or bash when it is unset) in the workspace directory. Because you typed it yourself, it bypasses the agent's permission system entirely. The command and its output are recorded into the conversation, and in the main session the agent then takes a turn to respond to the output.
Press Esc to interrupt a running command. Commands are limited to two minutes; a hung command is killed rather than freezing the session.
File and Agent References
Type @ followed by part of a name to open the picker, which fuzzy-matches against the workspace's files and any running subagents as you type. Use ↑/↓ to move, and Tab or Enter to insert the highlighted entry. Selecting a directory keeps the picker open on that directory's contents so you can browse inward. Path-like queries such as @~/Downloads/ or @../ browse the filesystem directly, including outside the workspace.
When your message is sent:
- Text files referenced with
@have their contents included with your message (workspace files only, up to the first 50 KB of each). The transcript shows just the@reference you typed. - Image paths (
.png,.jpg,.jpeg,.gif,.webp) are attached as images the model can see. These may point outside the workspace, e.g.@~/Downloads/screenshot.png. - Subagents: a message that starts with
@task-3(a subagent's ID), or with@<agent-type>when only one running subagent has that type, is sent to that subagent instead of the main agent. See Subagents.
Pasting Text and Images
Large pastes are collapsed so the composer stays readable:
- A paste of 1,000 bytes or more, or one taller than the input box, becomes a
[Pasted text #1 +40 lines]placeholder. The full text is sent with your message. - A paste over 64 KiB is uploaded to a file the agent reads; sending waits until the upload finishes. Pastes over 16 MiB are refused.
Press Ctrl+V to paste an image from the clipboard. The image is attached and an [Image #1] placeholder is inserted into your message; deleting the placeholder before sending drops the attachment. Dragging an image file into the terminal, or typing its absolute path, attaches it the same way. Images up to 25 MB are accepted and scaled down to fit what the model accepts. If the model rejects image input, pw code tells you so you can remove the image or switch to a vision-capable model with /model.
Over SSH
Inside an SSH session your local clipboard is unreachable, and pw code will say so. Copy the file to the remote machine (e.g. with scp) and attach it with @path instead.
Related Documentation
- pw code Overview: Feature overview and quick start
- Slash Commands: The
/command palette - Permissions: What the permission modes mean
- Plans, Goals & Checkpoints: Plan approval,
/goal, and/rewind - Remote Control & Agents: The agents list and the background daemon
- Subagents: The agent switcher and delegated tasks
- Sessions & Resume: The session picker
- Settings: Auto-scroll, mouse clicks, and other preferences
- Models & Allocations: The model picker