> ## Documentation Index
> Fetch the complete documentation index at: https://wonder.design/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose what a chat works with

> Add Wonder files, folders, other chats and worktrees to a chat, see what it works with, and take things out again.

A chat works in its repository's worktree. Add Wonder files, extra folders, other chats or other worktrees so your agent can use them too. **Works with**, the row of badges at the top of the chat's message box, shows everything a chat works with.

**Before you start** · Desktop app · Free plan

## See what a chat works with

**Works with** appears at the top of the message box once the chat works with something. Newest items come first. When they don't all fit, click **+N** at the end of the row to see the full **Works with** list.

![A chat's message box with two Works with badges at the top: a folder and a Wonder file](https://mintcdn.com/wonder-0722b0f6/F-ozoOg52_861U5c/images/control-your-agent/works-with.webp?fit=max\&auto=format\&n=F-ozoOg52_861U5c\&q=85\&s=414479589b0019861c3ba0aab8c5876d)

| Badge | What it is |
| - | - |
| A Wonder file | A design file in this worktree. A public file of another organization also shows **Public** and the organization's name. |
| A folder | A folder on this computer the agent works in, shown as **Linked folder**. |
| A worktree | Another worktree the agent works in, shown with its repository's name. |
| A chat | Another chat whose conversation the agent reads. |
| **With your next message** | Something you've added that goes with the next message you send. |

* Hover a folder to see **Linked folder**, or a chat to see Wonder's summary of where it left off once Wonder has made one.
* Click a file to open it, or a chat to go to it.
* A badge that's dimmed, struck through and marked **Unavailable** points at a folder or worktree that no longer exists, or a chat that was archived or deleted. Remove it.

## Add a Wonder file

1. In the message box, click **+** and choose **Add file**, or type `/add-file`.
2. Pick a file. The list shows the newest files from every organization you're in. To add a file from a link, paste its Wonder link after `/add-file`.

In a worktree's chat, the file joins the worktree: every chat in that worktree works with it. In a quick chat, which has no worktree, the file goes with your message instead.

A worktree holds up to 50 Wonder files.

## Add a folder

1. In the message box, click **+** and choose **Add folder**, or type `/add-dir`.
2. In the folder picker, choose the folder and click **Add folder**.

The agent can then read and change the files in that folder, as far as the chat's [mode](https://wonder.design/docs/permission-modes-and-approvals.md) allows. You can add folders to a chat in a repository, not to a quick chat. Your disk, your home folder itself and Wonder's own data can't be added.

## Link another chat or worktree

1. In the message box, click **+** and choose **Link a chat or worktree**.
2. Pick a worktree from its repository's list, or a chat under **Chats**. To find one that isn't listed, choose **Search chats and worktrees**. For a new worktree of this repository, choose **New worktree**.

What the agent gets depends on what you link:

* **A chat:** its conversation, never its files. It goes with your next message, and again whenever that chat has something new, until you remove the link.
* **A worktree:** its files, as an extra folder the agent can read and change, as far as the chat's mode allows.

Anything already linked shows **Linked** in the menu. If the agent is busy when you add or remove a worktree or folder, the chat says **Worktree change staged. Restarting with new context when the current turn finishes.** The change takes effect once the agent finishes.

## Read-only and editable Wonder files

A Wonder file from an organization you're a member of is editable: the chat can read and change it. A public file of another organization is read-only: it shows **Read-only** in the file list and **Public** in **Works with**, and Wonder tells your agent it can only read it. There's no switch for this. It follows your membership, so to let a chat change the file, ask to join the organization it belongs to.

## Remove something

1. Hover the badge in **Works with**, or open **+N**.
2. Click the **×** that appears on it.

Removing a Wonder file takes it out of the worktree, so no chat in that worktree works with it anymore. Removing a folder, worktree or chat only unlinks it from this chat; nothing is deleted.

## If something goes wrong

* **"That folder can't be added to a chat."** Choose a folder other than the disk root, your home folder itself, or Wonder's own data.
* **There's no Add folder or `/add-dir`.** The chat is a quick chat, or its agent can't work in extra folders. For Codex, update the desktop app.
* **"This worktree already has 50 files, as many as Wonder keeps."** Remove a file from **Works with** to make room.
* **"You can't open that file."** You don't have access to it. Ask its owner for access, or check the link.
* **"That link doesn't open a Wonder file."** Paste a link to a Wonder file or one of its pages.
* **"File left out of this message".** The file was deleted, or you can no longer open it.

## Related

* [Permission modes and approvals](https://wonder.design/docs/permission-modes-and-approvals.md)
* [Tools and MCP servers](https://wonder.design/docs/tools-and-mcp-servers.md)
* [Add to chat from the canvas](https://wonder.design/docs/add-to-chat-from-the-canvas.md)
* [Files and folders](https://wonder.design/docs/files-and-folders.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.