[Bug] Agent stuck in infinite loop after bash command completes successfully
Bug Description
Claude gets stuck after completing a bash command successfully (e.g. git add). It enters an infinite loop even though the bash command finished (green circle).
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.28
- Feedback ID: 21a980a7-6b06-4931-9879-89cd4d6b255b
Errors
[]
Example:
⏺ Perfect! Let me add these changes and commit:
⏺ Bash(git add website/src/components/Edit/InputField.tsx website/src/components/Group/GroupForm.tsx website/src/components/SearchPage/SearchForm.tsx website/src/compo…)
⎿ (No content)
⎿ Interrupted · What should Claude do instead?
> did you get stuck?
⏺ No, I was about to commit but let me continue. Let me commit the fragment removal:
⎿ Interrupted · What should Claude do instead?
> /feedback
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/7091
- https://github.com/anthropics/claude-code/issues/9879
- https://github.com/anthropics/claude-code/issues/10197
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Yo lowk just like kill the session fam
I created a separated claude command which had to create separate worktrees and spawn agents with the same prompt in each.. it created infinite loop (in 3 separate git worktrees!) and costed me tens of millions of tokens.. seems like parallel agent execution is not there yet