How the AI coauthor knows which document you mean, how to send it a text selection with Add to Agent Thread, how to attach workspace files or upload local files, and the size and type limits.

Giving the AI Context: Attachments and Selected Text

The AI coauthor works best when it knows exactly what you are talking about. Coauthor supplies three kinds of context with every message: the document you have open, any text you explicitly selected, and any files you attached. You do not need to paste content into the chat; point the agent at it instead.

The three kinds of context

ContextHow it is setHow the agent treats it
Active documentAutomatically: the document or file open in the editor when you sendThe default scope. "Add a section" or "fix the introduction" applies to this document.
Selected textSelect text, right-click (or press Enter), and choose Add to Agent ThreadThe primary target. "Rewrite this", "shorten this", "add a bullet point" apply to the selection, and the agent edits the source document at that location.
Attached filesDrag files from the workspace panel into the input, or upload files from your computerThe subject of your request. "Summarize this", "what does this say", "compare these" refer to the attachments.

When several are present the agent prioritises selected text, then attachments, then the active document. It is told not to go hunting for what you are working on; that information is already attached to your message.

The active document

Whatever is open in the document panel when you press Enter is sent along as the active document path. This works for rich text and LaTeX documents and also for uploaded files you are viewing in a tab, such as a PDF or Word file. If nothing is open, the agent has no default document and will ask or work at the workspace level.

Adding selected text

  1. In the editor, select the passage you want to discuss.
  2. Right-click the selection, or press Enter while the text remains selected, and choose Add to Agent Thread. The agent input receives focus.
  3. The selection is collapsed in the editor and a preview appears above the input box, labelled Selected from <document path>. Long selections are shortened in the preview but sent in full.
  4. Type your request and send. The selection travels with that one message and is cleared afterwards.

To drop the selection before sending, click the Remove selection button (×) in the preview. Only one selection is held at a time; adding another replaces the first. The other selection actions are described in Acting on a Selection.

Attaching workspace files

Drag a document or an uploaded file from the workspace panel on the left and drop it onto the input box. While you drag, the box highlights and shows Drop to attach. The file appears as a chip above the input with its filename. Because the file already lives in the workspace it is not uploaded again; the agent reads it directly.

Uploading files from your computer

You can also attach files that are not in the workspace yet, in two ways:

  • Click the Attach file paper-clip button at the bottom-right of the input box and pick one or more files.
  • Drag files from your desktop or file manager onto the input box.

Each file is uploaded straight away and shown as a chip. Images show a small thumbnail; other files show a document icon. Chips report their status:

StatusMeaning
uploading… (yellow border)The file is being sent to Coauthor.
extracting… (yellow border)The text of a PDF or Word file is being extracted so the agent can read it.
failed (red border)Upload or extraction failed. Remove the chip to continue.

While any attachment is uploading or extracting, the input is disabled and a line under the chips explains why, for example Extracting attached file contents. You can continue once extraction finishes. Sending resumes as soon as every attachment is ready. Uploaded attachments belong to the thread they were sent in, so open a thread before attaching.

Accepted file types and limits

CategoryAcceptedMaximum size
ImagesPNG, JPEG, WebP, GIF5 MB each
DocumentsPDF, DOCX25 MB each
Text and sourceTXT, MD, TEX, BIB, STY, CLS, BST, CSV, TSV, JSON, YAML, XML, HTML, and common programming languages (Python, R, JavaScript, TypeScript, Java, C/C++, and others)25 MB each

Files of other types, or over the size limit, are rejected silently at selection time, so if a chip does not appear, check the type and size. Images are passed to the model as images, which is useful for asking about a figure or a screenshot of an equation; text-based files are passed as extracted text.

Very large documents and results

The model can only read a limited amount of text per request. When a document, attachment or tool result is larger than that, the agent gets a shortened version with a note saying so, and reads the rest in parts when it needs it. If the request still does not fit, the message A file or tool result in this request was too large for the model to read in one go appears. Starting a new chat does not help in that case; ask about one section at a time instead ("check the methods section of paper.docx").

Removing attachments

Click the × (Remove file) on a chip to drop it. Attachments and the selection are cleared after a message is sent successfully; if sending fails they stay in place so you can retry.

Tips

  • Combine a selection with an instruction rather than quoting text: select the paragraph, Add to Agent Thread, then write "make this more concise".
  • For a multi-file LaTeX paper, open the file you want changed before asking, or name the file explicitly ("in sections/method.tex").
  • Attach a PDF of a related paper and ask for a comparison with your open document; the agent reads both.
  • The agent can also read any workspace file itself with its file tools, so for large projects you can simply name files instead of attaching them. See Tools: What the AI Can Read and Change.

Related articles

AI Coauthor Overview
Tasks
Tools: What the AI Can Read and Change
Acting on a Selection: Comments, Agent Thread, and PDF
Supported File Types

Prefer to ask?

Inside Coauthor, ask the AI coauthor how any feature works — it answers from these same help articles. For anything else, use the ? button in the top-right corner of the app.

Ready to Write Better Research Papers?

Let Coauthor help you with your next manuscript

7 days free, with €2.50 of AI usage on your own paper