Attachments
Attach files, folders, GitHub issues, GitHub PRs, and images to your Agent Chat prompts.
Attachments
Agent Chat lets you attach context to a message instead of pasting it inline. Attachments show up as inline chips in the composer, get expanded into the prompt at send time, and let you drop folders / images / GitHub URLs straight into the conversation.
This is part of the Agent Chat (Beta) surface. With Beta off, attachments are not available.
Attachment Types
| Type | Trigger | What it injects |
|---|---|---|
| File | @, + picker, drag-drop | Contents of the file, wrapped with a path header |
| Folder | @, + picker, drag-drop | A tree summary + each file's contents, capped at the configured ceiling |
| GitHub issue | + picker (paste issue URL or pick from list) | Title, body, comments, labels, state |
| GitHub PR | + picker (paste PR URL or pick from list) | Title, body, diff, comments, review state |
| Image | + picker, drag-drop, clipboard paste | Sent as a multi-modal message (provider-dependent) |
The + Popup
Click the + icon in the composer footer (or press the + icon next to your model picker) to open the unified attachment popup. The popup is organised into modes:
- Files — fuzzy-search your workspace tree. Tab to expand a folder for full-folder attachment.
- Folders — explicit folder picker for when fuzzy-search is awkward.
- Issues — list of open GitHub issues for the current repo, or paste a
https://github.com/...URL. - PRs — same as issues but for pull requests.
- Images — pick from disk, or use clipboard paste.
The popup dismisses on outside click (Esc also works).
@ Mentions
Typing @ in the composer opens a fuzzy file picker inline. Select a file and it becomes an attachment chip the same way the + picker does. Faster for "I know the filename" cases.
Drag and Drop
- Files / folders from your file manager — drop anywhere on the composer.
- Images from your browser or screenshot tool — drop anywhere on the composer.
The drop target highlights when you hover with a valid item.
Clipboard Paste
You can paste images directly into the composer with Ctrl+V (or the platform equivalent). This works for:
- Screenshots from
grim, the GNOME Screenshot tool, Snipping Tool, etc. - Images copied from a browser (right-click → Copy Image).
- Images on your clipboard from any other source.
The paste also works on the new-workspace prompt input, so you can drop a screenshot straight into the "What do you want to do?" textarea when creating a workspace.
Inline Chips
Attached items show up as compact chips in the composer footer, above the textarea. Each chip shows:
- Type icon — file, folder, issue, PR, or image thumbnail.
- Label — filename, folder name,
#42for issues,PR #137for PRs. - Tooltip on hover — full path or URL.
- Expand button — preview the content that will be injected.
- Remove button — drop the attachment.
Send-Time Injection
When you hit Send, attachments are expanded into the underlying API request:
- Files and folders — wrapped with path headers; folders walk the tree skipping
.gitignore-d entries, hidden files (toggleable), and binary files. - Issues and PRs — fetched fresh from the GitHub CLI at send time; you get the current state, not a snapshot from when you attached.
- Images — sent as multi-modal content blocks where the provider supports it (Claude vision, GPT-4o vision). Providers without vision support reject image attachments with a clear error.
Caps and Safety
- Per-attachment size cap to prevent a 2-megabyte minified bundle from blowing through your context window.
- GIF guard — large animated GIFs are rejected with a friendly warning instead of silently failing the request.
- Total context cap — if your attachments would exceed the model's context window, you get a warning before send.
Related
- Agent Chat — the chat pane these attachments live in
- Workspaces — the new-workspace prompt input also accepts image paste
- Pull Requests — the source of the PR data attachments