[BUG] Some sort of infinite loop/crash
Resolved 💬 3 comments Opened Jan 9, 2026 by karptonite Closed Jan 13, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have an instruction that, twice in a row, seems to have gotten the claude-code cli caught in some sort infinite loop/crash. After I give the instruction, I get wild flashing on the screen at the bottom--it looks like it is doing a series of actions, too fast for me to really follow, in sequence. I had to use ctrl-c to get out of it.
What Should Happen?
It should not crash.
Error Messages/Logs
Steps to Reproduce
I'm not sure this will allow a reproduction, but here is the complete content of my last chat:
Documents/workspace git:(main) ✗ claude
▐▛███▜▌ Claude Code v2.1.2
▝▜█████▛▘ Opus 4.5 · Claude Max
▘▘ ▝▝ ~/Documents/workspace
❯ I just had what seemed like some sort of infinite loop crash on the claude cli.
⏺ That sounds frustrating. Claude Code crashes like that are worth reporting so the team can investigate.
To report this issue, you can file a bug at: https://github.com/anthropics/claude-code/issues
When filing, it helps to include:
- What you were doing when the crash occurred (the task/prompt)
- Any error messages that appeared
- The Claude Code version (claude --version)
- Whether it's reproducible
Is there anything else I can help you with, or would you like to try continuing the task that was interrupted?
❯ let's get back to what was interrupted. Do you have any record of what it was?
⏺ No, I don't have any record of the previous session. Each conversation starts fresh with no memory of past sessions.
From the git status shown at the start of this conversation, I can see there are uncommitted changes to:
- .claude/settings.json
- CLAUDE.md
That might give you a hint about what you were working on, but I can't tell you what the actual task or discussion was. Do you remember what you were trying to accomplish?
❯ In this session, I will have us work on [redacted2]. However, my primary goal is streamlining my use of claude. I'd like to focus on adjusting claude settings so that my work is
more smooth. I'd like not to be interrupted for permission requests unless something is important, for example. I'd also like to avoid situations where claude tries to run a
command, and gets an error that would have been avoidable if it better understood the environment. Therefore, whenever something happens that requires you to ask permission,
or
you run into a command that fails in a way that could be fixed, please stop work on whatever we are doing on [redacted2], and address the workflow issue instead. Does this makes
sense?
⏺ Yes, that makes sense. The meta-goal is workflow optimization - whenever we hit friction (permission prompts, avoidable command failures), we pause the [redacted2] work and fix the underlying issue first, whether that's adjusting Claude settings, updating CLAUDE.md files, or noting environment specifics.
Let me start by reading the required CLAUDE.md files as instructed.
⏺ Read([redacted]/CLAUDE.md)
⎿ Read 582 lines
⏺ Read([redacted2]/CLAUDE.md)
⎿ Read 335 lines
⏺ Read(.claude/settings.json)
⎿ Read 57 lines
⏺ Understood. The approach is:
1. Primary work: [redacted2] tasks
2. Meta-goal: When permission prompts or avoidable command failures occur, pause and fix the root cause (settings, CLAUDE.md, etc.) so it doesn't happen again
I've read both CLAUDE.md files and the current settings. You have a solid set of pre-approved permissions covering:
- File operations in [redacted]/ and [redacted2]/
- Git commands
- Common shell utilities
- Angular build/lint/test commands
- Web fetches to Angular docs, GitHub, and ng-bootstrap
What would you like to work on in [redacted2]?
❯ Start by looking at our recent commits in [redacted2] We're modernizing some of the angular code there. Suggest how we might continue. However, I tried this last time, and ran into
permission issues. Hopefully, that is fixed now.
⏺ Bash(git -C [redacted2] log --oneline -30)
⎿ e367b46da Convert LoginFormComponent to standalone and remove LoginFormModule
324ab4757 Import ItemLinkUiComponent directly instead of EssentialItemsModule
ba3c359db Convert shared components to standalone
… +27 lines (ctrl+o to expand)
⏺ The recent work shows a clear modernization pattern:
1. Standalone component migration - Converting module-based components to standalone and eliminating modules (LoginFormModule, PostModule, ForumSharedModule, SharedModule items, etc.)
2. Subscription management - Migrated from AbstractDestroyableComponent to #subSink pattern
3. Signals migration - Some [redacted] components converted to Angular signals
Let me check what remains to be modernized.
⏺ Bash(grep -r "standalone: false" [redacted2]/src/app --include="*.ts" | wc -l)
⎿ Interrupted · What should Claude do instead?
Bash(grep -r "extends AbstractDestroyableComponent" [redacted2]/src/app --include="*.ts" | wc -l)
⎿ Running…
⏺ Search(pattern: "\.module\.ts$", path: "[redacted]/src/app")
⎿ Found 0 files
❯ OK, I just got asked for permission to run grep. Can we fix that so that I won't get asked for permission for that again?
· Wandering… (esc to interrupt)
At this point, it started its looping.
This is the first time I've seen behavior like this.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.2
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗