GOD TIER PROMPT I FOUND FOR SOLVING BUGS AGENTICALLY:
when i'm bug fixing a codebase with claude code/codex (especially bigger ones)
i often send agents off to research & understand the parts of the codebase RELATED to the bug, read logs, then propose their findings and potential solutions
THE MAGIC TRICK HERE is to ask them this question AFTER they report their findings:
"Are we solving symptoms, or are we solving ROOT problems in the architecture design/decision?"
sometimes, my agents confidently say "this is a ROOT problem, and solving this will prevent further issues in the feature"
other times, my agents go "oh shit, this is actually just a solution to treat a symptom CAUSED by this OTHER underlying issue (the root)"
then they work on doing more research to understand the root problem, and implement the TRUE solution.
You guys must understand why this works -
when agents are "thinking and reasoning" (their internal thoughts before their response to you) they are essentially just talking to themselves. It's just hidden away from chat
in the early pre-thinking days of LLMs, a common prompt that DID lead to greater outputs was to tell the agents to "think step by step" which made them first output tokens to talk to themselves, which gave them more context to build on top of, which lead to a more accurate solution.
this same concept is applied here, but rather than telling the agent to "think step by step" (because they ALREADY do that internally now), they already reasoned to GET to these findings
so when we prompt them with a different question (like the above, "is this the root or a symptom?" the existing context they already have in the chat leads to the GOD tier output we're looking for
this concept does not only apply to bug fixes, this works in a very general, broad way when working with agents
It's why discussing & planning with claude first BEFORE implementation works so well - they have existing context to guide them with accuracy !
try this yourself and let me know if this helps or if you guys have any questions