Debugging: the agent failed — what to check first
Your agent produced nonsense — don't rewrite the prompt blindly. A four-question checklist in strict order: is the goal checkable? does the tool exist and is it well described? what was in the context? did it hit a limit? Plus a symptom-to-cause table and a log walkthrough.