Code RoomRecognizing when AI chases symptoms
HardPrep Room Coding #4047

Recognizing when AI chases symptoms

Vibe & agenticAlgorithms & data structuresSenior–Staff~22 min

You ask an AI agent to fix a flaky Go test that fails ~5% of the time. It diagnoses a 'race condition' and adds a `sync.Mutex` around the shared map; still flaky. You re-prompt, it adds a `time.Sleep(50 * time.Millisecond)` 'to let the goroutine settle'; still flaky, now slower. Third try it bumps the sleep to 200ms. You're watching it chase the symptom. How do you recognize the model is stuck and reset the approach?

Implement
detect_magic_number_loop(patches: list[str]) → str
Examples
in[["mutex=1","sleep_ms=50","sleep_ms=200"]]out"continue"
in[["sleep_ms=50","sleep_ms=200","sleep_ms=500"]]out"reset:sleep_ms"
in[["timeout_ms=1000","timeout_ms=1000","timeout_ms=1000"]]out"continue"
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 22 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.