---
title: "Attach files and pictures"
description: "Put a file next to your message and the agent reads it with the words."
url: "https://agentfield.ai/docs/codeaf/attach-files"
canonical: "https://agentfield.ai/docs/codeaf/attach-files"
markdown_url: "https://agentfield.ai/llm/docs/codeaf/attach-files"
contract_version: "2026-03-24-v1"
docs_revision: "a2a2b0669dab"
product: "CodeAF"
category: "general"
difficulty: "unspecified"
keywords: []
last_modified: "2026-11-02T17:24:14.000Z"
ai_summary: "Put a file next to your message and the agent reads it with the words."
---

Show it what you mean. A screenshot of the bug says more than a paragraph about it.

Attach a picture and it travels with the message, so the model sees it. Attach any other file and the agent gets its path and reads it with its own tools. Either way the attachment sits as a chip above the input box until you send.

## Try it in CodeAF

**Where:**

In a conversation in your repo.

**Type:**

`/attach docs/screenshot.png`

Then type your question and press <kbd>Enter</kbd>.

**You see:**

The chip `▣ #1 screenshot.png` above the box, and your sent line ending in `[#1 screenshot.png]` with a `preview` control under it.

## Four ways to attach

`/attach` with a path attaches it directly, and `/attach` alone opens the file browser described below; `/upload` is the same command. Dragging a file into the terminal, or pasting a line that is only file paths, attaches those files. Typing `@` completes a file name from the project, and a picture picked that way is attached too. Pictures can be png, jpeg, webp or gif, up to 10MB each.

## The file browser

`/attach` on its own opens `add context`, a column browser laid out like a desktop file manager: the path across the top, folders on the left, the folder you are in beside them, and its files on the right with their sizes, pictures marked `▣` and audio or video `▶`. <kbd>←</kbd> and <kbd>→</kbd> walk up and down the tree, typing searches folders and files, <kbd>Alt</kbd>+<kbd>W</kbd> previews the file under the cursor and <kbd>Alt</kbd>+<kbd>H</kbd> shows hidden files. <kbd>Enter</kbd> adds the file; the bottom row, `add this folder`, adds the whole folder instead. There is no separate `/finder` command: this browser is what `/attach` opens, and `/folder` uses the same columns to choose the folder you work in.

## Seeing pictures in the terminal

A picture in the transcript starts folded. Click `preview`, or press <kbd>Alt</kbd>+<kbd>I</kbd> for the last one on screen, to draw it in the terminal at low resolution, and <kbd>Alt</kbd>+<kbd>O</kbd> opens the original in your system viewer. When the model you talk to cannot see images, CodeAF passes the picture to a vision model for that turn and says which one, as in `[vision: google/gemini-3.7-flash]`, so you never have to switch models to ask about a screenshot.

Long pastes fold too: three or more lines become a `[paste N · L lines]` token, so the box stays readable while the whole text is sent.

## Things to build

- **Bug reports from screenshots:** attach the broken page and ask for the failing component and a fix.
- **Mockup to markup:** attach a design export and ask for the page, then attach a screenshot of the result to compare. [Pictures, video, voice and music](/docs/codeaf/media)
- **Log triage:** `@` a long CI log and ask for the first real error and its cause.

## Go further

[Pictures, video, voice and music](/docs/codeaf/media): Pictures, video, speech and music are first-class work in CodeAF, each on its own model that you choose, with the file landing in your project.
