[BUG] Claude crashes if interrupted during command execution
Resolved 💬 3 comments Opened Dec 29, 2025 by ajwrigley Closed Jan 1, 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?
If I interrupt Claude while it's in the process of running a long-running Bash tool call, it crashes the process. This only seems to happen if manually interrupted (ESC) and only if Bash is running.
What Should Happen?
Claude should interrupt and continue the conversation as normal without crashing the process.
Error Messages/Logs
153 | Total duration (API): ${YQ(gV())}
154 | Total duration (wall): ${YQ(HYT())}
155 | Total code changes: ${vCT()} ${vCT()===1?"line":"lines"} added, ${gCT()} ${gCT()===1?"line":"lines"} removed
156 | ${R}`)}function ve9(){xe9.useEffect(()=>{let T=()=>{if(X9R())process.stdout.write(`
157 | `+PnR()+`
158 | `);wnR()};return process.on("exit",T),()=>{process.off("exit",T)}},[])}function IFH(T,R){return Math.round(T*R)/R}function Q9R(T,R,A){ngA(T,R,A),BuA()?.add(T,{model:A}),CYT()?.add(R.input_tokens,{type:"input",model:A}),CYT()?.add(R.output_tokens,{type:"output",model:A}),CYT()?.add(R.cache_read_input_tokens??0,{type:"cacheRead",model:A}),CYT()?.add(R.cache_creation_input_tokens??0,{type:"cacheCreation",model:A})}var xe9;var $z=X(()=>{t_();T0();X9();lA();lA();lA();xe9=S(HT(),1)});function QFH(T,R){return R.input_tokens/1e6*T.inputTokens+R.output_tokens/1e6*T.outputTokens+(R.cache_read_input_tokens??0)/1e6*T.promptCacheReadTokens+(R.cache_creation_input_tokens??0)/1e6*T.promptCacheWriteTokens+(R.server_tool_use?.web_search_requests??0)*T.webSearchRequests}function XFH(T){return T.input_tokens+(T.cache_read_input_tokens??0)+(T.cache_creation_input_tokens??0)}function ZFH(T,R){let A=EE(T),D=ge9[A];if(D===eAT&&XFH(R)>200000)return ynR;if(!D)return o("tengu_unknown_model_cost",{model:T,shortName:A}),xzR(),ge9[EE(me9 | ... truncated
SystemError: kill() failed: EPERM: Operation not permitted
syscall: "kill",
errno: 1,
code: "EPERM"
Steps to Reproduce
- Open Claude on a codebase
- Ask Claude to run tests or some other long-running command
- Hit ESC
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.72 (Claude Code)
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 ↗