AI Agent Failure Modes

FailureWhy it happensRequired correction
Claims cross-platform done after Android runAgent confuses one target with all targetsList tested and untested targets
Adds stale package APITraining data or snippets are outdatedLoad current docs/pub.dev and run analyzer
Assumes plugin supports web/desktopPackage works on mobile in examplesCheck platform support before coding
Edits native folders blindlyAgent treats platform code as boilerplateRead platform docs and isolate changes
Stores critical data in preferencesFast code path looks simpleUse storage decision matrix
Claims release readiness from debug modeflutter run succeededBuild release artifact and smoke it
Commits signing secretsAgent follows release guide too literallyStop, use secret management, never print secrets
Enables driver extension permanentlyApp-driving setup copied into production pathGate behind --dart-define and verify release excludes it
Skips accessibilityVisual screenshot looked fineRun accessibility checklist and screen-reader smoke

Agent Prompt Addendum

Use this in Flutter implementation prompts:

Before editing, identify target platforms and package/plugin support.
Do not add dependencies without approval.
After editing, run flutter analyze and flutter test.
If platform code or plugins changed, state which targets were actually smoke-tested.
Do not claim release readiness without a release artifact and target-specific checklist.