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. When your organization or your settings define startup announcements, one is shown under it.
- Streaming markdown: Responses stream in as the model generates them and are rendered as formatted markdown, including highlighted code blocks. Each reply and tool call starts with a dot that blinks until it finishes.
- 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. - Turn summary: Each turn ends with a dim line saying how long it took and when it finished, such as
✻ Worked for 42s · done 3:15 PM. While background subagents are still running, it readsWaiting for 2 background agents to finishinstead. - Session recap: When you switch away from the terminal after a turn,
pw codewrites a one- or two-sentencerecap:of the session so it is waiting when you come back. Turn it off with the Session recap row in/settings, or run/recapfor one at any time. Recaps need a terminal that reports when it gains and loses focus. - Inline images: In terminals with image support (such as Kitty, Ghostty, WezTerm, and iTerm2, outside tmux and Zellij), images the agent reads and images you attach are previewed inline. Other terminals show a text placeholder.
- 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, oresc: stop · enter: steerwhile the agent works). When background commands are running, it also shows a count such as2 shells (↓ to manage). - 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 takes back every message still waiting, for editing. In shell mode, only earlier ! commands. |
| ↓ (past the newest entry) | Move into the agent switcher when subagents are running, then to the background commands count; 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. In an empty shell-mode prompt, leave shell mode. |
| Esc Esc (at an empty prompt) | Open /rewind to restore an earlier checkpoint. See Rewinding. |
| Ctrl+C | With text typed, clear the composer. While a turn or ! command runs, ask what to do with it (see Leaving While the Agent Works). Cancel a running /compact. At an empty prompt, press twice to quit. |
| Ctrl+Enter | While the agent works, send your waiting messages to it now. Ctrl+X then Ctrl+S does the same on terminals that read Ctrl+Enter as Enter. |
| Ctrl+B | Move running shell commands, yours or the agent's, to the background so the turn carries on. |
| Ctrl+D | Quit (at an empty prompt). |
| Shift+Tab | Cycle the permission mode: read-only → accept-edits → auto → plan. bypass-permissions joins the cycle after auto only when the session was started in it. |
| ? | 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. |
| Alt+I | Show the next attached images when more are attached than fit above the composer. |
| Ctrl+L | 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 waits, dimmed, above the activity line until the agent reads it at its next step, so you can correct course without stopping the turn. Press Ctrl+Enter to hand it over now instead: a reply still being written is cut short and asked again with your message, and a running shell command moves to the background.
- Slash commands and
!commands queue and run when the turn ends, except the commands listed in Commands While the Agent Is Working. - ↑ at an empty prompt takes back every message still waiting, so you can edit it.
Interrupting a turn with Esc stops only that turn and returns everything still waiting to the composer. If the agent had not yet read the message that started the turn, that message goes back to the composer too; otherwise it stays in the transcript, followed by the reply so far.
Leaving While the Agent Works
Pressing Ctrl+C while a turn or ! command runs asks Task is still running:
- Cancel task: stop the current task and stay in
pw code. - Run in background: exit and leave the task running. A running
!command first moves to the background commands. - Exit: stop the current task, pausing an active goal, and exit.
Run in background is left out when leaving would lose something only this window holds, such as queued messages or a compaction in progress. It works because the terminal is a client of a background service that hosts your sessions: exiting only disconnects, 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 main conversation, and the agent then takes a turn to respond to the output.
- While it runs, the transcript shows its newest output lines and a timer.
- A word containing
/lists that directory's entries; Tab completes the highlighted one. - Backspace at the start of the line, or Esc on an empty command, leaves shell mode.
- What you type while it runs queues and is sent after the agent's reply.
Press Esc to interrupt a running command. After two seconds, a running command offers (ctrl+b to run in background): Ctrl+B moves it to the background commands, and the agent is told when it exits. A command left in the foreground is limited to two minutes; a hung command is killed rather than freezing the session.
Background Commands
Shell commands can keep running in the background: ones the agent starts that way, ones you move there with Ctrl+B (the agent's shell calls offer it after running for two seconds, and the turn carries on without waiting), and ! commands you move there. While any are running, the permission line shows a count such as 2 shells (↓ to manage).
Run /tasks, or press ↓ from the composer until the count is selected and then Enter, to open the Background panel. It lists the running commands, newest first. Enter shows a command's status, runtime, and newest output, x stops it (the agent is told at its next turn), ← goes back to the list, and Esc closes the panel. /tasks <id> opens one command's details directly.
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 larger than about a tenth of the model's context window (1 MiB at most) is saved to a file the agent reads instead of being sent inline; sending waits until it is saved. 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. In terminals with image support, attached images are previewed above the composer before you send; press Alt+I to page through them when they do not all fit. 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