AGENTS.md & CLAUDE.md Playbook

Size limits and where content goes

By agent-playbook · 0 stars

### Published limits

| Tool | Limit | Kind |
|---|---|---|
| Claude Code | Under 200 lines per `CLAUDE.md`; longer files "reduce adherence" | Guidance |
| OpenAI Codex | Combined files stop loading at `project_doc_max_bytes`, 32 KiB default | Hard cap |
| Cursor | Under 500 lines per rule | Guidance |
| GitHub Copilot | About 2 pages, not task-specific | Guidance |
| Windsurf / Devin Desktop | 12,000 characters per workspace rule file; 6,000 for global rules | Hard cap |

Size that fits every row: root file 60 to 150 lines, under 8 KB.

### Alternative homes

| Content | Home |
|---|---|
| Rules for one file type or directory | Path-scoped rules: `.claude/rules/` with `paths`, Cursor `globs`, Copilot `applyTo`, Cline `paths` |
| Rules for one package | Nested `AGENTS.md` in that package |
| Multi-step procedures (release, migration, incident) | Linked doc, or a skill or reusable command where supported |
| Formatting and lint rules | Formatter and linter config; the file names the command |
| Architecture | `docs/architecture.md`, linked in one line |
| Personal preferences | `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`, or `CLAUDE.local.md` |

### Loading cost

| Mechanism | When it loads |
|---|---|
| `@import` (CLAUDE.md, GEMINI.md) | At launch with the parent; saves no context |
| Plain path link (no `@`) | Only when the agent opens it |
| Path-scoped rule | When a matching file is touched |

### Sources

- https://code.claude.com/docs/en/memory
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://cursor.com/docs/context/rules
- https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions
- https://docs.devin.ai/desktop/cascade/memories