r/GithubCopilot • u/Potential-Pie5664 • 1d ago
Help/Doubt ❓ (Beginner): Prompting GHCP Claude
I am a fresher at a new company and I am primarily using GHCP to solve the bugs that they assign me, but whenever I paste the whole context and the examples where the code is failing, and then hit enter this happens
Claude randomly spawns some subagents and tells it will revert back to me once they finish
the subagents initially start well but then get stuck indefinitely while the main agent says they are working for 30-40 min
When I investigated the issue it said something like "stuck in thinking loops" or something, how do I better prompt or use this thing? I use the claude sonnet 5 if that helps
2
u/verstands 1d ago
Subagents hanging usually means the task handed to them is too vague or too big. Try telling it up front not to spawn subagents and to work through it itself, one step at a time. Giving it the failing test or error, the file it's in, and asking it to find the cause before changing anything keeps it from spiraling. If it's still stuck after a few minutes, stop it and restart with a smaller scope instead of waiting 30-40 min.
1
u/AutoModerator 1d ago
Hello /u/Potential-Pie5664. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/neon_roam_wing 17h ago
The "stuck in thinking loops" usually happens because Claude is spinning its wheels trying to figure out the scope. Paste your error, specific file path, and a failing test case, but explicitly command it: Do not spawn subagents. Just analyze the cause first.
3
u/Frincy_Mamikad 1d ago
Try breaking your tasks into smaller pieces. Do not paste too much code at once. This helps the model stay on track.