[BUG] Session keeps getting interrupted without any external interventions like pressing escape
Status Fixed / completed
Reported on v2.1.78
Maintainer reply ✓ Yes — ashwin-ant
Activity 14 comments · opened Mar 18, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
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 am using Claude Code version 2.1.78. After upgrading to this version, any instruction I give, it goes into an interrupted state:
● Searched for 7 patterns, read 3 files (ctrl+o to expand)
⎿ Interrupted · What should Claude do instead?
❯ /status
⎿ Status dialog dismissed
❯ /effort
⎿ Effort level: auto
❯ continue
⎿ Interrupted · What should Claude do instead?
❯ proceed
⎿ Interrupted · What should Claude do instead?
❯ /compact
⎿ Error: Error during compaction: TypeError: A.with is not a function
Node version: v18.19.1
I am using a terminal inside vscode to do this on a remote server.
What Should Happen?
Until I upgraded, it would just process my instruction and churn out code. Now its not moving forward at all.
Error Messages/Logs
/compact
⎿ Error: Error during compaction: TypeError: A.with is not a function
❯ continue
⎿ Interrupted · What should Claude do instead?
❯ proceed
⎿ Interrupted · What should Claude do instead?
Steps to Reproduce
Just open claude code and give it an instruction.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.78
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
14 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The previous instance was closed and none of the details there helped address this issue. My claude.md is quite small.
I've been having this problem too, and it's been going on for 30 minutes now that I've noticed
I downgraded to 2.1.77 and the problem went away. Used the command: curl -fsSL https://claude.ai/install.sh | bash -s 2.1.77. Also, note that it install in the /local path unless you actively uninstall the current version. So, the next time you run "claude" cli run it from the /bin/ path that it downloaded 2.1.77 to.
Thanks, the issue was fixed after rolling back to the previous version
Confirmed. Upgrading Node.js from v18 to v20 fixed the issue for me.
Root cause:
Array.prototype.with()was introduced in Node v20. Claude Code v2.1.78 uses this API, which causes a silent crash on Node v18, manifesting as repeated "Interrupted · What should Claude do instead?" with no error message.Fix:
After upgrading,
/compactno longer throwsTypeError: A.with is not a functionand sessions run normally.我的也是一样,降级到上一个版本就没有此问题了。
Detailed technical analysis from CI/headless mode debugging
We hit this same regression in our headless CI pipeline (
claude -pin GitHub Actions with AWS Bedrock). Here's what we found after ~10 diagnostic CI runs.Root cause: Node.js v18 incompatibility
Claude Code v2.1.78 uses
Array.prototype.with(), which was introduced in Node.js v20. On Node.js v18, this causes a silent crash that manifests as[Request interrupted by user]/error_during_execution.Fix: upgrade Node.js from v18 to v20. After upgrading, Claude Code v2.1.78 (latest) works correctly — verified in CI with a full successful run (42 turns, ~3.5 min).
How we found it
The
--debug-fileoutput showed this warning before the interruption:This turned out to be a downstream symptom of the
Array.prototype.with()crash — the internal state gets corrupted, triggering the circuit breaker, which then fires the abort controller and injects[Request interrupted by user]into the conversation.Symptom sequence (from
--output-format stream-json)tengu_auto_mode_configcircuit breaker fires (due to underlyingA.with is not a functionerror)"interrupt"[Request interrupted by user]text message is injected into the conversationtool_resultblocks, finds text)error_during_executionwith an empty errors arrayVersion timeline
| Date | Version | Node.js | Result |
|------|---------|---------|--------|
| March 17, ~09:00 UTC | 2.1.77 | v18 | SUCCESS |
| March 18, ~09:00 UTC | 2.1.78 | v18 | FAILURE |
| March 18 (test 1) | 2.1.77 pinned | v18 | SUCCESS |
| March 18 (test 2) | 2.1.78 (latest) | v20 | SUCCESS |
What we ruled out
--dangerously-skip-permissionsdidn't help)--max-turns 200didn't help)< /dev/nulldidn't help)Environment
CLAUDE_CODE_USE_BEDROCK=1)us.anthropic.claude-sonnet-4-5-20250929-v1:0,us.anthropic.claude-haiku-4-5-20251001-v1:0Fix
Upgrade Node.js to v20+:
Duplicate of this issue — closed #35832.
This solution solved our issue. Thank you.
Same issue here. Version 2.1.79, macOS (darwin), Node v18.20.8. Claude auto-interrupts every tool use (Search, Read, Bash) with "Interrupted · What should Claude do instead?" without any user input. Happens in both VS Code integrated terminal and external Terminal.app. Reinstalling did not fix it. Session never completes any task, just loops and ends with "Worked for Xs".
https://github.com/anthropics/claude-code/issues/35643#issuecomment-4080873697 worked for me, too. Thanks.
Reinstalling claude using the new native installer (curl -fsSL https://claude.ai/install.sh | bash) seems to have fixed this for me.
This was fixed in v2.1.81 — Sessions on Node 18 (npm install) no longer self-interrupt with a TypeError on the first progress update. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.