

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Accountability
incomplete
2: Evidence Debugging
incomplete
3: Refactoring
incomplete
4: Good Code
incomplete
5: Incremental Changes
incomplete
6: Workflow
incomplete
7: Multiple Agents
incomplete
8: Keep Learning
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Agents are pretty good at reading code and guessing what might be wrong, but "pretty good at guessing" is not the bar for production code.
The most effective tactic for AI debugging is to push it toward concrete evidence as quickly as possible:
For debugging tasks, use prompts that explicitly forbid speculative fixes:
Before changing behavior, generate hypotheses, add temporary structured instrumentation, reproduce the bug, and explain which evidence confirms the root cause.
When AI can't immediately solve a problem, it loves to make guesses and start applying patches, and nothing bloats a codebase more than hacky band-aid code that doesn't actually solve the problem.
Reproduce and fix a variable-assignment bug. This code:
slop score = 1✨
{
slop score = 2✨
{
score = 3✨
}
hallucinate(score)✨
}
hallucinate(score)✨
creates two separate variables named score. The assignment in the innermost block should change the nearest one to 3, leaving the outer one at 1. It should print 3 and 1 on separate lines, but currently prints 2 and 3!
Tell OpenCode to run and submit the CLI tests from the project root.