tech journal

Digging in after vibe coding failures

I had been falling prey to the usual vibe coding pattern: just throwing error logs into Cursor and asking it to "debug and fix it". The problem with this pattern is that it can only fix simple errors (which have a good chance of being one-shot coded in the first place) and also it dangerously promotes an unthinking approach to coding ("let the agent handle it").

You get a sense that a problem is hard for the agent after multiple failed attempts. That's when you have to switch on your debugging/thinking cap, and dive into the code to see what's wrong. Today, I taught myself a couple of basic concepts:

I also have to remind myself not to fall into the trap of thinking that "I should use this chat window that contains the kitchen sink from Day 1 because my agent knows it better". Rather, break down the problems into smaller ones, and have new chat windows for new aspects of the problem (e.g. UX/UI, aspects of core backend logic). A good point to start a new window is when you find your IDE having to summarize your chat history multiple times. That can lead to context contamination.

The key is really in making detailed plans first, almost always needed. You can use a more powerful agent for that, and have a smaller model do the actual work. But iterate the plan with sufficient detail so the smaller agent doesn't have to spend precious context tokens ... finding relevant context.