Skip to main content
In Code mode, the file explorer gives you the workspace tree, file search, and an in-app text editor.

Find and open a file

Browse folders or search by file name, path, or content. Workspace search respects .gitignore. Files referenced in an agent reply or diff open at the relevant location. Images open as image previews. Supported documents open in the document viewer.

Edit text

Open a text file and edit it directly. The editor saves changes automatically and updates the workspace diff. If another tool or agent changes the file on disk while you are editing, Mains reports the conflict so you can choose how to resolve it. A stale editor buffer does not silently overwrite the newer file.

Add code to a message

Select code and choose Add selection to chat, or use the default editor shortcut ⌘L. You can also select files through @ to attach them to the composer. Combine code with an issue, review comment, or screenshot to explain the task.

File boundaries

The explorer checks paths against the workspace root, blocks path traversal and symlink escapes, and limits text reads and writes to 2 MB. Binary files do not use the text editor. These are boundaries for the file explorer. Agent tools have their own permissions and sandbox settings; the explorer’s boundary is not a guarantee that every agent is restricted to the same directory.

Work files

Work uses documents, sources, and deliverables without the Code file tree and Git controls. See Documents, Collections, and Atlas for that workflow.