If the LLM Is Stuck, Ask It to Write a Diagnosis Script
davepotts.software·1d·
Discuss: Hacker News
Flag this post

When Copilot gets stuck trying to directly fix a problem, asking it to write a diagnostic script can help get unstuck.

The Pattern

Instead of repeatedly asking Copilot to fix the issue directly, request a standalone diagnostic script. The script should:

  • Test different configurations to isolate the problem
  • Output detailed information about what works and what doesn’t
  • Be independent and easy to run

Example

Whilst fixing a web scraper that was getting 403 errors, direct attempts to fix the issue went in circles. Asking Copilot to write a diagnostic script revealed that the issue was missing HTTP headers.

The diagnostic script tested multiple header combinations and logged the results, making the root cause obvious. See [diagnose_403.py](https://github.com/davegoopot/m…

Similar Posts

Loading similar posts...