Objective
Your mission
Debug until hitting the whack-a-mole trap, then escape using the fresh-context technique. Output: escape_log.md.
You need: Any AI coding tool with a project you can break.
Time: 30 minutes.
Step 1: learn to recognize the trap (3 min)
You're in the whack-a-mole trap if:
- Each fix solves the immediate error but creates a new one
- You've done 3+ correction rounds and the build isn't converging
- Errors are cycling (old errors come back after being fixed)
- You're fixing symptoms, not root causes
The 3-round rule:
- Round 1: Paste error → AI fixes → new error. OK, normal.
- Round 2: Paste new error → AI fixes → another new error. Getting concerning.
- Round 3: Paste third error → AI fixes → yet another error. STOP.
After 3 rounds without converging, continuing is counterproductive. The AI's context is overloaded.
The context pollution principle
Every message, every correction, every error you paste fills the AI's context window. After 3 rounds, the AI is holding: your original spec, the first build, first error, first fix, second error, second fix, third error, third fix, and your current message. Fresh context eliminates all that baggage — the AI sees only the current code and the current problem.
Step 2: build something and create a complex bug (5 min)
Build a small app with AI. Then intentionally create a complex bug — something that touches multiple parts of the app. For example:
- Break the data flow between a form and a list
- Remove a key import that multiple components depend on
- Change the data structure so it doesn't match what the UI expects
Step 3: debug until you hit the trap (10 min)
Debug using the 4-step loop from Lesson 03. Keep going until you hit 3+ rounds where each fix creates a new problem.
Write in your file:
## Round 1
Error: [message]
AI's fix: [summary]
New problem created: [what broke]
## Round 2
Error: [message]
AI's fix: [summary]
New problem created: [what broke]
## Round 3
Error: [message]
AI's fix: [summary]
New problem created: [what broke]
## Trap Recognized
When did I realize I was in the whack-a-mole trap? [after which round?]
If you fix it in 1-2 rounds, create a harder bug and try again.
Step 4: escape with fresh context (10 min)
Don't continue in the same chat. Start fresh:
- Open a new chat (or new project in a browser builder)
- Describe the current state: "I have a [app type]. It should [what it should do]. Currently, [specific current problems]. Here's the current code: [paste current code state]."
- The AI starts with clean context and can often solve the problem in one shot.
Write in your file:
## Fresh Context Escape
New chat prompt: [what you told the AI]
AI's response: [summary — did it fix all problems in one shot?]
## Comparison
Rounds in original chat: [number]
Rounds in fresh chat: [number]
Which was faster? [original / fresh]
Which produced a better result? [original / fresh]
Three fix rounds in, each fix creates a new error and old ones return. What should you do?
After three rounds without converging, the context is polluted with every failed attempt. A fresh chat with the current code and problem usually fixes it faster.