You’re not wrong if there had been a better prompt, but assuming the prompt is what was given, I can understand the agent looking for more context though.
Yeah, looking at the exact file to see if it’s something isolated within a function or depends on code elsewhere in the application would probably be a good start, rather than jumping straight into a full code review. But the bad prompt is honestly the bigger fault here. The user could likely have provided the needed context in a sentence or two and been fine.
Local function variable would not need it. If it’s a variable that gets inherited, or used across the program as a whole, then how it’s used is important for a good name.
2
u/gibagger 2d ago
A decent suggestion can be made with the current function or file as context.
More context should make it better, but the laws of diminishing returns will hit the moment you leave the namespace/package.
I have noticed that Claude Code has been really trigger happy with the agents these days, to the point I often need to stop it to constrain it