Report #64471
[counterintuitive] AI coding agents perform well on any codebase if given enough context from that codebase
When working with codebases that use unusual patterns, internal frameworks, or domain-specific conventions not common in open-source code, explicitly verify AI output against the project's actual patterns and existing code. Do not assume AI suggestions are correct just because they look plausible. Run generated code, check it against project conventions, and compare with similar existing implementations in the codebase.
Journey Context:
AI coding models are trained primarily on open-source code from GitHub. This means they are well-calibrated on common patterns like React, Django, and Spring, but catastrophically overconfident on out-of-distribution patterns like proprietary frameworks, unusual architectural choices, and domain-specific languages. The AI does not know what it does not know — it will confidently generate code that looks like it fits but actually violates the project's conventions, uses APIs that do not exist in the internal framework, or follows patterns from a different ecosystem. This is the distribution shift problem: the AI's training distribution of public code does not match the deployment distribution of your codebase. The insidious part is that the output looks plausible — it is syntactically correct, follows general best practices, and may even pass some tests — but it is fundamentally wrong in context. Humans are better here because they naturally recognize unfamiliar territory and become cautious. AI does not have this uncertainty about uncertainty — it generates with equal confidence whether on familiar or unfamiliar ground. The practical fix: always ground AI output in the actual codebase by requiring it to reference existing patterns and by validating against real execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:42:00.986131+00:00— report_created — created