Does Claude Code read AGENTS.md automatically?
Claude Code auto-loads CLAUDE.md by default, not AGENTS.md. Adding a 3-line CLAUDE.md containing @AGENTS.md lets Claude Code load your canonical AGENTS.md automatically at session start.
Adapt an existing AGENTS.md for Claude Code — either as a full standalone CLAUDE.md or a zero-drift @AGENTS.md pointer — with instant checks against Claude Code's 40,000-character truncation ceiling.
# CLAUDE.md Canonical engineering rules for our Python 3.12 data pipeline managed with `uv`, tested with `pytest`, and checked with `ruff` + `pyright`. ## Commands - Sync environment: `uv sync --dev` - Fast unit check: `uv run pytest tests/unit/test_ingest.py -x -q -m "not slow"` - Full test suite: `uv run pytest -q` - Lint & types: `uv run ruff check . && uv run pyright` ## Hard Boundaries - Don't invoke global `python` or `pip`. Instead prefix commands with `uv run`. Because host Python versions diverge from `pyproject.toml`. - Don't silence errors with bare `except Exception: pass`. Instead re-raise or log structured context. Because silent fallbacks hide broken ETL rows. - When editing connectors, read `docs/connectors.md` before modifying schemas. ## Continuity - Keep `.env` out of git and record passing test counts in `HANDOFF.md`.
| File | Loaded By | What Belongs Here | Sync Strategy |
|---|---|---|---|
| AGENTS.md | Codex CLI, Cursor, Copilot, Windsurf | Canonical project facts, build/test commands, architecture & safety boundaries | Single source of truth |
| CLAUDE.md | Claude Code | @AGENTS.md import + .claude/settings.json hooks, skills, and permissions | @AGENTS.md |
| .cursor/rules/*.mdc | Cursor Agent & Inline Edit | Path-scoped conventions using globs: frontmatter (UI, SQL, tests) | Scoped via globs: |
| .github/copilot-instructions.md | GitHub Copilot | Thin pointer to AGENTS.md or synced repo instructions | Pointer / CI check |
| GEMINI.md | Gemini CLI | @AGENTS.md import + Gemini CLI-specific guidance | @AGENTS.md |
Claude Code auto-loads CLAUDE.md by default, not AGENTS.md. Adding a 3-line CLAUDE.md containing @AGENTS.md lets Claude Code load your canonical AGENTS.md automatically at session start.
Claude Code hard-truncates single memory files past 40,000 characters (MAX_MEMORY_CHARACTER_COUNT = 40000, AgentLint check I7). Our converter scores your output live so you stay well inside the effective 60–250 line zone.
Copy verified starters for TypeScript, Python, Next.js, FastAPI, Rust, Go, Vue, and Monorepos.
Read our empirical data on 132-line medians, 37 repos exceeding 40K chars, and 58% unpinned Actions.
Inspect how VS Code, Next.js, uv, and Bun structure their CLAUDE.md and AGENTS.md harnesses.