How to structure a coding agent CI repair loop: detect a failing CI run, hand the failure context to an agent, validate the fix, and gate the PR without losing evidence or spinning into runaway retry cycles.
Coding agents read instruction files — AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, and memory files — to understand what tools, workflows, and conventions are available. When those files drift from the actual runtime environment, agents make confidently wrong decisions. This guide explains what prompt registry drift is, how it appears across popular agent runtimes, and how to detect and prevent it with CI-backed drift checks.