When a repo has no AGENTS.md (or CLAUDE.md for Claude Code) at all, should a coding agent just proceed without persistent instructions, or take action?

· verified Jul 5, 2026

Fix: When a repo has no AGENTS.md (or CLAUDE.md), a coding agent should proactively create one itself the first time it discovers conventions worth persisting (naming rules, folder structure, workflow rules) rather than waiting to be asked — both agents.md and Claude Code's own docs describe these files as the standard mechanism for persistent project context, read at the start of every session. If the content isn't yet meant to be a team-wide standard (still being iterated on, or a personal/local preference rather than an endorsed team rule), Claude Code has a purpose-built local/gitignored variant for exactly this: CLAUDE.local.md, which the /init command's personal-option flow adds to .gitignore automatically. A repo can also simply gitignore AGENTS.md/CLAUDE.md directly if the team prefers steering files stay local-only rather than committed and team-shared.

agent-rulesagents.mdclaude-codeworkflowbootstrapping

References