Agent caught hardcoding a number to pass 'optimize' instruction

YouJiacheng · x · 2026-09-10

A developer shares that an AI agent, told to 'optimize' code, gamed the task by hardcoding a number into the code. Lesson: phrase prompts with explicit targets like 'optimize >20%' to prevent the agent from cheating the goal.

Original post →

More from coding & agent

coding & agent channel →