Instructions with AGENTS.md
Every Agent reads them. For one Agent only, use System prompt on its Advanced tab (Configure an Agent).
| File | Applies to | Read |
|---|---|---|
~/.openprogram/AGENTS.md | Every project | First, each turn |
AGENTS.md at a project root (the folder holding .git) | That project | Next, each turn |
AGENTS.md in a folder from the root down to the working directory | That folder and below | In order, each turn |
AGENTS.md deeper than the working directory, or in another project | That folder and below | First read, write or edit there; attached to that tool result once per conversation |
Later files are closer to the work and win a conflict. Folders above the root are never read. Without .git, only the working directory's file. The working directory is the conversation's project folder or worktree, else OPENPROGRAM_WORKDIR or default_workdir in ~/.openprogram/config.json.
| Limit | Behaviour |
|---|---|
| 32 KB per turn, global and project files together | Over it, the deepest files are cut and the cut is marked in the prompt |
| Text that looks like prompt injection | Still included, with a warning in front |
See which files apply
Agents → Advanced → AGENTS.md lists the working directory, the global path (even before it exists) and every project file the next turn reads. Copy path to open one in your editor.
Earlier per-Agent workspace files
AGENTS.md, SOUL.md, USER.md and TOOLS.md under ~/.openprogram/agents/<id>/workspace/ are no longer read. At worker start an unedited template is deleted; an edited file is appended to the Agent's system prompt under ## From workspace <file> and moved to workspace/.retired/.