Solutions
Can GitHub Copilot CLI read a PDF?
Updated
Yes, with a condition: GitHub documents that Copilot CLI can attach PDFs to a prompt when the selected model supports image input, and Word and Excel files are not covered. In Forkbench, PDF, Word, Excel and PowerPoint files kept in Files reach Copilot CLI as Markdown from read_file, whatever the model.
Copilot CLI accepts a PDF attachment, until you switch to a model that does not take images and it stops. A Word document or a spreadsheet has no attachment route at all, so the agent is left guessing at a binary file.
An attachment rides in the prompt, whole, every time it is sent. Converted text can be read in slices, so a long specification costs what the agent actually reads. The document also stays out of the repository, encrypted in Files and exposed only to the thread doing the work, and Copilot receives it marked as file content rather than instructions.
How it works
- 1Run GitHub Copilot CLI in a Forkbench terminal. It reads Files with read_file where Forkbench has set up its tools, and with `fb file read` from the shell everywhere else.
- 2Add the document to Files and expose it to the thread: hold Option and drop it on the terminal, which does both and pastes its name.
- 3Ask the agent to read it by name. read_file returns Markdown, one heading per page, sheet or slide, 256 KB at a time, so a long document is paged rather than refused.
- 4Keep the original. get_file still saves the real file to disk when the agent has to work on it with a library.
Straight about the guarantee: Attachment support is GitHub's to change; this reflects GitHub's documentation as of 25 November 2026.
Frequently asked
Do I need a different model for spreadsheets?
No. A workbook arrives as text, one table per sheet, so any model Copilot CLI offers can read it.
Related: Claude Code says "PDF too large", Giving an agent a document without putting it in the repo