

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 2
click for more info
Not enough gems
Cost: 6 gems
1: Prompting
incomplete
2: Plan Agent
incomplete
3: Canceling
incomplete
4: Steering
incomplete
5: The Prompt Box
incomplete
6: Queueing
incomplete
7: Prompt Examples
incomplete
8: Speech to Text
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
One of the easiest ways to make waste tokens with coding agents is to let a bad loop continue for too long.@sama a lot of money
If you're watching your agent work (and let's be frank, most of the time you actually shouldn't be), you'll see the tools it's calling, the changes it's making, and the reasoning it's producing in real time. If something looks off, press Esc twice to cancel the loop.
Just correct the bad behavior with a new prompt and try again. Canceling preserves the conversation context and doesn't undo changes already made.
After I fire off a prompt I usually tab away to work on something else (that's one of the main productivity boosts of using an agent). That said, sometimes I hang around for about 10 seconds, especially if it's a particularly large task, just to make sure things got off to a good start.
Another big-brain strat is to bake a "cancel condition" directly into your prompt. This is super useful if the start of the task is "research" and the next step is "implement". If the research comes back with less than optimal results, you want the agent to stop and ask you what to do next, rather than blindly implement a bad plan. For example:
If you can't find an API endpoint that matches the functionality we need, pause and ask me what to do next.