Solutions

How do I give an AI coding agent a document that isn't in my repo?

Updated

Quick Answer

Keep the document outside the repository, somewhere you decide per job which agents may read it. In Forkbench that is Files: documents are encrypted on your Mac before they are stored, nothing is visible to an agent until you expose it to a thread, and the agents in that thread read it by name with read_file, PDFs and Office files converted to text, without it ever being copied into the project.

The agent needs the client's spec, the API vendor's PDF, a CSV export of production data. None of it should be committed, some of it should not leave your control at all, and copying it into the project folder means it ends up in the next commit, the next screenshot, or the next agent's context whether or not that job needed it.

The point is scope. A file in the repository is visible to every agent that opens the repository, for as long as it is there. A file exposed to a thread is visible to the agents working in that thread, and to nothing else, until you withdraw it. Exposing is a snapshot: exposing a folder gives what it holds now, not whatever is added to it later. And because a file's contents come from outside, from a client or a vendor, an agent receives them marked as file content, data to work with, so a document cannot pass itself off as instructions.

How it works

  1. 1Add the document to Files, from the Files page or by holding Option while dropping it on a terminal.
  2. 2Expose it to the thread for the job. Other threads, and agents outside Forkbench, cannot list or read it.
  3. 3Tell the agent its name. In a terminal, the name is marked; hovering it shows which file it is, and a name shared by two files lists both.
  4. 4Withdraw it when the job is done. The file stays in Files; the thread loses access.

Straight about the guarantee: An agent that can read a file can repeat what it says. Exposure decides which agents read a document, not what they do with it afterwards, so do not expose something to a job that has no need for it.

Frequently asked

Related: Limit what folders an agent can touch, Stop Claude Code from reading your .env file