Go FartherDocs Open Coder

Coder docs

How Coder's tools work: read, write and edit so far, with more on the way.

Read

Read opens a file in your project and shows it to Coder with line numbers, the way you'd see it in an editor. It never changes anything.

Text files

  • A whole file comes at once when it fits: up to about 100,000 characters.
  • A bigger file comes in parts. The first part ends with a note, such as [PARTIAL view: lines 1-1111 of 1561 (about 90 KB of 127 KB). Read more with offset 1112 and limit 450. …], and Coder reads on before it answers.
  • A file over 256 KB isn't read whole in one go: Coder reads the part it needs, or searches it first.
  • Lines are never cut. A single line too long for one read is read on its own.
  • Files in UTF-8 and UTF-16 are read as text. A file saved in an old text format (such as Windows-1252) shows the letters it can't decode as �, with a note telling Coder to change it only in a way that keeps its format, so the real letters are never lost.

Pictures

  • PNG, JPEG, GIF, WebP, BMP and TIFF, up to 128 MB. Coder sees the picture, and a small copy shows under the step in your chat.
  • A big picture is shown at up to 2,000 pixels. Coder is told its real size, how to map a spot back onto it, and how to crop a part for fine detail.
  • Pictures you paste or attach are saved in your project's .coder-pictures folder (never saved to your branch), so Coder can open them again later in the chat.

PDFs

  • Up to 10 pages are read whole. A longer PDF is read by page ranges, at most 20 pages at a time.
  • Coder sees every page as a picture as well as its text, so charts and layouts aren't missed. The first pages show small under the step.
  • A password-protected or broken PDF says so, and Coder counts a PDF's real pages, even when the file says otherwise.

Notebooks

  • Jupyter notebooks (.ipynb) come as their cells, with each cell's output, charts included. The charts show small under the step.

What read won't open

  • A folder: read says it's a folder, and Coder lists what's in it instead.
  • Binary files such as .zip or .xlsx: Coder is told a way to read each kind.
  • Pipes and devices, and anything outside your project, including a link that points out of it.

Files you mention with @

  • Type @ and a file's name in your message, and the file goes into the message, so Coder has it right away. Files whose name matches come first in the list.
  • A folder comes as its list of files, and a picture is shown. A file too big for one read is named, and Coder reads the part it needs.

What Coder is told on its own

  • A missing file comes with the folder Coder is in, so a wrong folder is easy to spot.
  • If one of Coder's commands changes a file it has read (a command that shows a file, such as cat, counts as reading it), Coder is told, with the lines that changed.
  • After a long chat is summarized to make room, Coder reads again up to five files it was working on, newest first.

Write

Write makes a new file, or replaces a whole file with new content. For a change to part of a file, Coder uses edit.

What you see

  • Under each write, what it wrote: a new file's lines, or what changed in a replaced file (lines taken out in red, lines added in green), with the counts on the step, such as +12 or +3 −2. The first lines show; tap for the rest.
  • For JavaScript, TypeScript and Python files, a language server checks the file right after the write. New mistakes show as Found 1 new diagnostic issue in 1 file (tap to see them), and Coder is told about them, so it can fix them.
  • Up to about 90,000 characters at a time. A longer file is written in parts: the start first, then the rest added with edit.

When Coder reads first

  • A file it has seen only part of, or a notebook it hasn't read.
  • A file that changed since Coder read it, whether one of its own commands or something running in the background changed it. Coder looks at the change before writing over it.
  • A big instruction file (CODER.md, AGENTS.md or a rules file) it was shown only the start of: Coder reads all of it, or changes part of it with edit.

Files Coder asks you about

  • Files that can make code run on your computer when you pull the branch, or change how the project is built, such as .husky, .vscode, .devcontainer, .envrc, .npmrc, .pre-commit-config.yaml and .mcp.json. Coder shows a card with what it would write, and Allow or Don't allow. In a job started from GitHub, it doesn't change them.

When write says no

  • A file in an old text format (such as Windows-1252): writing would lose its real letters, so Coder changes it with a command that keeps its format, or asks you about converting it.
  • A shortcut (link) to another file: write names the real file instead. A link that leads nowhere, or links that go round in a loop, are refused too.
  • A folder's name, or a name with a hidden character in it: write says so.

What stays as it was

  • A file in UTF-16 stays UTF-16, and a UTF-8 file's hidden marker at its start (a byte-order mark) stays.
  • A script stays runnable, and line endings are written as given.

Edit

Edit changes part of a file: it finds a piece of text that's in the file once, and puts new text in its place. For a new file, or one replaced whole, Coder uses write.

What you see

  • Under each edit, what changed: lines taken out in red, lines added in green, with the counts on the step, such as +3 −2. The first lines show; tap for the rest.
  • For JavaScript, TypeScript and Python files, a language server checks the file right after the edit, as after a write. New mistakes show as Found 1 new diagnostic issue in 1 file, and Coder is told about them, so it can fix them.
  • After an edit in a folder with its own CODER.md (or AGENTS.md), Coder is shown that file, so it follows that folder's instructions.

How edit finds the text

  • The text has to match the file exactly, spaces and indentation included, and be in it once. If it's in the file more than once, edit says how many times, and Coder adds more of the text around it, or changes every place at once.
  • Line endings don't get in the way: text with ordinary line endings finds the same text in a file with Windows ones.
  • Straight quotes find curly ones (“ ” ‘ ’), and the new text gets curly quotes too.
  • With no old text, edit makes a new file, and the folders it goes in. On a file that already has text in it, it says the file already exists.

When the file changed

  • If the file changed since Coder read it, and the text being changed is still in it once, the edit goes ahead, and Coder is told the file has other changes it hasn't seen. If the text isn't in it once any more, Coder reads the file again first.

Files Coder asks you about

  • The same files as write. The card shows the lines edit would take out and put in, and Allow or Don't allow. A very long line is cut short, with … at its end. In a job started from GitHub, Coder doesn't change them.

When edit says no

  • A file in an old text format, a shortcut (link) to another file, a folder's name, or a name with a hidden character in it: the same as write.
  • A file that isn't text, such as a picture: Coder uses a command or a script made for that kind of file.
  • A notebook (.ipynb): a change to its text can break its cells, so Coder replaces it whole with write, or changes a cell with a short script.
  • A file over 256 MB: Coder works on parts of it with commands.

What stays as it was

  • The file's line endings (in a file with mixed ones, every line gets the kind most of its lines have), a UTF-16 file's format, and a byte-order mark.
  • A script stays runnable, and a read-only file stays read-only.