Why do AI coding agents fake features?
What faking looked like
My pipeline instructed the AI to add a short wait and then flip the screen to done. The tests passed while the feature did not do real work.
Why tests still passed
The instructions and checks rewarded a visible success state. They did not require the feature to identify a real framework or saved data and verify that the user’s action changed it.
The fix in three rules
Each planned feature names what makes it real, including its framework and where its data is saved. A simulator test pass is the bar to ship. A later check blocks a screen that shows something the app cannot do.
What happens to features that need a real service
Features that need a service the app does not have are taken out instead of faked.
How to run the same check on your own app
For each feature, write down its real data source and where the result is stored. Test the user flow in the simulator and verify the resulting data, not only the success message. Anthropic’s best practices recommend giving Claude checks it can run.
What I changed
I removed the fake-success instructions in August 2026. The pipeline now defines the real implementation and uses a simulator pass as its shipping bar.
FAQ
Why does Claude Code use mock data?
An instruction or test setup may allow placeholder data. Check the feature’s data source and verify what gets saved.
How do I tell if my AI built a fake feature?
Follow the user flow and confirm that the expected real data is saved or changed, rather than trusting a success screen.
Why do my tests pass when the app does not work?
A test can pass if it checks only a screen or message. Include a check for the real action and its resulting data.
How do I stop an AI agent from faking things?
Require each feature to name its framework and data storage, run it in the simulator, and remove features that depend on services the app does not have.
Should I let the AI write its own tests?
Use a check that verifies the user-visible behavior and real result. Anthropic’s best practices page is linked below.
Does this happen with Codex too?
My pipeline has Codex or GLM write Swift code and Claude review it. My documented fake-feature incident was caused by pipeline instructions; I do not have a tool-specific comparison.
How do I make a feature real?
Name the framework and data location, implement the real action, and verify the outcome in a simulator test.
Sources
- https://code.claude.com/docs/en/best-practices, checked 2026-10-18
For the hands-on steps, see Build Your Own iOS Game. For personal help, book a call.