This was a problem I regularly had using Copilot w/ GPT4o or Sonnet 3.5/3.7... sometimes I would end up down a rabbit hole and blow multiple days of work, but more typically I'd be out an hour or two and toss everything to start again.
Don't have this w/ Claude Code working over multiple code bases of 10-30k LOC. Part of the reason is the type of guidance I give in the memory files helps keep this at bay, as does linting (ie. class/file length), but I also chunk things up into features that I PR review and have it refactor to keep things super tidy.
Yeah, Github Copilot just didn't work for me at all. The completions are OK and I actually still use it for that but the agent part is completely useless. Claude Code is in another league.
Don't have this w/ Claude Code working over multiple code bases of 10-30k LOC. Part of the reason is the type of guidance I give in the memory files helps keep this at bay, as does linting (ie. class/file length), but I also chunk things up into features that I PR review and have it refactor to keep things super tidy.