Skip to content

Course · Claude Code · Daily workflow

Paste images and write multi-line prompts

! and @ - the inline prefixes that land shell output and exact file references in the conversation - get text into the agent. Two everyday inputs do not fit that shape. One is a failure you can see but cannot easily copy: a stack trace in a teammate’s screenshot, a garbled terminal you photographed rather than retried. The other is a prompt with structure - a spec, a few numbered constraints - that you cannot type line by line without each line firing as its own turn. Both have a clean inline move, verified against the interactive-mode reference.

Copy an image to your clipboard and paste it directly into the prompt. On most setups that is Ctrl+V - notably not the terminal’s usual paste: on a Mac, Cmd+V pastes text into the terminal and generally will not carry an image, except in iTerm2, which maps Cmd+V for image paste. On WSL, both Ctrl+V and Alt+V are bound; use Alt+V if your terminal intercepts Ctrl+V. If a paste lands as plain text instead of an image, the full key table is in the interactive-mode reference. The paste inserts an [Image #N] chip at the cursor, so you can refer to the image positionally inside the sentence you are writing.

Here is an illustrative prompt with one image in it - a picture of last night’s failing CI run:

> this [Image #1] is last night's failing run - read the failure and tell
me whether it's the allowAsync race in @src/payments/rate-limiter.ts or
a test that drifted

A screenshot carries detail your words would flatten: exact strings, file names, counts, the shape of the stack. The agent reads the image itself, not your summary of it. One honest caveat: when you have the text, paste the text - ! output is searchable and exact where a re-photographed terminal is neither. Reach for the image when the thing is genuinely visual, or when the picture is all you have.

Write a spec as one turn, not line by line

Section titled “Write a spec as one turn, not line by line”

The last inline friction is the Enter key. By default Enter submits, which is exactly wrong when the prompt needs structure - a few bullets, a short spec, a snippet quoted between sentences. You want a newline without a submission.

The two zero-configuration methods work everywhere: \ then Enter, and Ctrl+J. Option+Enter works where your terminal passes Option as Meta, which macOS terminals need configured. Shift+Enter is native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. In VS Code, Cursor, Zed, and older Alacritty, run /terminal-setup once in the host terminal and it writes the binding into the terminal’s own config; in gnome-terminal and JetBrains terminals Shift+Enter is not available at all - use Ctrl+J. The full matrix lives in the terminal configuration guide.

Pasting, meanwhile, is already safe: a multi-line block lands in the prompt as one draft rather than firing line by line. The Enter problem only bites when you are typing.

The thing to write this way is a real spec, and the payments service - the small TypeScript example this course returns to - has one waiting. Its dedup check records an idempotency key before the payment finishes, so a retry after a failed payment is wrongly rejected as a duplicate (the planning chapter traces that defect in full). Here is the fix shaped into a single prompt, an illustrative rendering of that design:

> implement the idempotency fix: \
- a missing Idempotency-Key must not be deduped silently - reject it \
- checkIdempotency must not mark a key as seen; only markProcessed may \
- a retry after a *failed* payment must be accepted, not rejected \
- keep the "duplicate payment" error for confirmed duplicates \
files: @src/utils/idempotency.ts and @src/payments/processor.ts \
write the regression tests in tests/payments.test.ts before changing code

Four constraints, a file list, and a test-first order - one turn, one response. Typed line by line, each of those lines would have fired as its own prompt, with the agent improvising around a fragment of the spec.

With images and structured prompts going in cleanly, getting things in is solved. The next set of moves is about what happens once you are in flight: asking a question, catching up, or reusing a command without breaking the session you are working in. That’s staying in flow.