Definition
Plain language
Baking a fixed value or shortcut straight into the code instead of working it out properly.
As stated in the literature
Embedding task- or environment-specific constants and branches directly in source; hardcoding benchmark specifics is a classic overfitting/reward-hacking route, which is why some self-improvement prompts forbid it.
Also called: hardcoded, hardcoding, hard-coded, hard-coding
Why it matters: Hardcoding makes a system look like it solved the problem when it only memorized the grader, so scores go up while real capability does not.
For example, instead of writing code that sorts any list, an agent writes code that returns the exact answer the test expects for the one list in the test.
Heard on the show
“To inspect setup scripts for hardcoded data masquerading as real data.”Episode 017 — When the Agent Grades Its Own Homework: A Brutal New Benchmark for AI Workers