Harness Notes

Image input

Updated 2026-11-22,

On this page

How to give each harness a screenshot, mockup or diagram from its terminal, what it accepts, and whether the image survives in the saved session.

Getting an image in

Questionpichecked at 1.2.0
Paste from the clipboard

Press Ctrl+V in the editor (Alt+V on Windows and WSL; rebind via app.clipboard.pasteImage). Pi saves the clipboard image (PNG, JPEG, WebP or GIF; other formats such as BMP are converted to PNG) to a temp file and inserts that file's path into your prompt, and the agent opens it with its read tool. On Linux it uses wl-paste or xclip, on WSL it falls back to PowerShell for Windows screenshots, and in Termux only text can be pasted.

A pasted image arrives as a temp-file path in the prompt text, not as an attachment, so the model sees the pixels only after it reads that file.

If the clipboard holds files copied in Finder (macOS), Ctrl+V pastes their paths instead.

Attach an image file

At launch, pass @path arguments, e.g. pi @screenshot.png "What is wrong here?": image files are attached to the first prompt as real images. Inside the session, type @ to fuzzy-search a file or drag the file into a terminal that pastes its path; that puts the path in your prompt and the agent opens it with read.

Only @file launch arguments become image attachments; paths typed, completed or dropped in the editor stay text.

Images in scripted runs

Yes: combine @file arguments with -p/--print or --mode json, e.g. pi -p @mockup.png "Build this layout". Piped stdin is read as text and prepended to the prompt, so pipe the prompt and pass the image as @file. --mode rpc rejects @file arguments; send base64 images in RPC commands instead.

Images through the SDK or API

RPC mode (pi --mode rpc) accepts an optional images array on prompt, steer and follow_up commands, each {"type":"image","data":"<base64>","mimeType":"image/png"}. In the SDK, call session.prompt(text, { images }), session.steer(text, images) or session.followUp(text, images) with the same ImageContent objects. Pi has no ACP surface.

Images sent with steer, follow_up, or a prompt that is queued during a run skip Pi's resize step and go to the provider as given.

What is accepted

Questionpichecked at 1.2.0
Formats, limits and resizing

Files are detected by content as PNG, JPEG, GIF, WebP or BMP (BMP is converted to PNG). By default (images.autoResize: true) Pi shrinks images to fit 2000 x 2000 pixels and 4.5 MiB of base64, trying PNG and JPEG and lowering JPEG quality or dimensions until it fits, and tells the model the original size so it can scale coordinates. Per-model limits go in models.json under inputLimits.images.resize (maxWidth, maxHeight, maxBytes, jpegQuality); Pi does not enforce a count limit.

An image that cannot be converted or shrunk below the limit is dropped and replaced by a text note such as [Image omitted: could not be resized below the inline image size limit.].

Animated PNGs are not recognised as images.

An image with no text

Yes. pi @screenshot.png with no message sends the image with only a file-name tag, an RPC prompt with "message": "" and images is accepted, and in the terminal a pasted image path alone is a valid prompt. Pi drops the empty text part for OpenAI-compatible providers that reject it.

Models that can't see images

Pi replaces each image with (image omitted: model does not support images) (or (tool image omitted: ...) for tool results) before sending to a model whose input lacks image, and the read tool adds a note that the image will be omitted. The images stay in the session, so switching to a vision model later sends them again. pi --list-models shows which models take images, and images.blockImages: true withholds images from every model.

Afterwards

Questionpichecked at 1.2.0
Kept in the saved session

Partly

Image blocks are stored as base64 inside the session JSONL (user attachments and read/tool results), so pi -c, /resume and forks send the same pixels again. Compaction summarises older turns as text only, so images before the kept recent window are lost from context. A pasted image is saved only as its temp-file path in your message; its pixels persist only if the agent read the file.

Images are encoded once at their first resize; changing models later does not re-encode stored images.

The agent opening images itself

Yes. The built-in read tool opens JPEG, PNG, GIF, WebP and BMP files and returns them to the model as image attachments, resized with the same rules as prompt images. This is how pasted and dragged image paths reach the model, and MCP resources and tool results that contain images are passed on as images too.

Notes and sources

pi, 28 sources
Paste from the clipboard, 5
Attach an image file, 4
Images in scripted runs, 3
Images through the SDK or API, 4
Formats, limits and resizing, 5
An image with no text, 3
Models that can't see images, 5
Kept in the saved session, 4
The agent opening images itself, 3