[BUG] crash when using esc to interrupt claude sometimes

Resolved 💬 3 comments Opened Dec 4, 2025 by antonysouthworth-halter Closed Dec 7, 2025

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?

See below logs: it looks like Claude Code threw up when trying to run ps? claude running in docker container that doesn't have ps utility:

What Should Happen?

It should not crash.

Error Messages/Logs

840 | Total duration (API):  ${SY(TV())}
841 | Total duration (wall): ${SY(NZT())}
842 | Total code changes:    ${b9T()} ${b9T()===1?"line":"lines"} added, ${x9T()} ${x9T()===1?"line":"lines"} removed
843 | ${R}`)}function tKD(){oKD.useEffect(()=>{let T=()=>{if(VrT())process.stdout.write(`
844 | `+DnR()+`
845 | `);let R=Q1();jQ({...R,lastCost:D3(),lastAPIDuration:TV(),lastToolDuration:LwA(),lastDuration:NZT(),lastLinesAdded:b9T(),lastLinesRemoved:x9T(),lastTotalInputTokens:UwA(),lastTotalOutputTokens:PwA(),lastTotalCacheCreationInputTokens:MwA(),lastTotalCacheReadInputTokens:hwA(),lastTotalWebSearchRequests:kwA(),lastSessionId:aR()})};return process.on("exit",T),()=>{process.off("exit",T)}},[])}function N18(T,R){return Math.round(T*R)/R}function hTR(T,R,A){NwA(T,R,A),vwA()?.add(T,{model:A}),UZT()?.add(R.input_tokens,{type:"input",model:A}),UZT()?.add(R.output_tokens,{type:"output",model:A}),UZT()?.add(R.cache_read_input_tokens??0,{type:"cacheRead",model:A}),UZT()?.add(R.cache_creation_input_tokens??0,{type:"cacheCreation",model:A})}var oKD;var hM=Y(()=>{RB();c0();f9();PA();PA();PA();oKD=N(JT(),1)});function L18(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.se | ... truncated 

error: Executable not found in $PATH: "ps"
      path: "ps",
     errno: -2,
   syscall: "spawn ps",
 spawnargs: [ "-o", "pid", "--no-headers", "--ppid", 2270 ],
      code: "ENOENT"

      at spawn (unknown:1:1)
      at spawn (node:child_process:669:35)
      at spawn (node:child_process:14:39)

● Bash(cd /tmp/concourse && git push)
  ⎿  Interrupted · What should Claude do instead?

───────────────────────────────────────────────────────────────────────────────────────────────────────────
> nah  
───────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏵⏵ bypass permissions on (shift+tab to cycle)

Steps to Reproduce

I am not sure how to reproduce. It is intermittent.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.58

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Kitty term.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗