[BUG] Shell commands (using the Bash tool) in claude code fail causing zsh coredumps

Resolved 💬 4 comments Opened Jan 20, 2026 by AnoRebel Closed Feb 27, 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?

When claude code tries to run shell commands using the Bash tool, it creates multiple instances of shell-snapshots commands(When i run ps command) and gives weird shell outputs with constant coredumps. And even when I close claude code, the commands still persists, slowing down the whole OS.

What Should Happen?

Commands should run, complete, give output and clears command process.

Error Messages/Logs

PID: 420016 (zsh)
           UID: 1000 (user)
           GID: 1000 (user)
        Signal: 11 (SEGV)
     Timestamp: Tue 2026-01-20 17:20:30 EAT (2min 55s ago)
  Command Line: /usr/bin/zsh -c -l $'source /home/user/.claude/shell-snapshots/snapshot-zsh-1768918798918-ykp2so.sh && setopt NO_EXTENDED_GLOB 2>/dev/null || true && eval \'git status\' \\< /dev/null && pwd -P >| /tmp/claude-20f3-cwd'
    Executable: /usr/bin/zsh
 Control Group: /user.slice/user-1000.slice/user@1000.service/kitty-2622-2.scope
          Unit: user@1000.service
     User Unit: kitty-2622-2.scope
         Slice: user-1000.slice
     Owner UID: 1000 (user)
       Boot ID: 1f7329a793ad487c9e0da4e186c5f6fc
    Machine ID: 2d006e2dfebb48b8a73553368f5971a3
      Hostname: PC
       Storage: /var/lib/systemd/coredump/core.zsh.1000.1f7329a793ad487c9e0da4e186c5f6fc.420016.1768918830000000.zst (present)
  Size on Disk: 1M
       Message: Process 420016 (zsh) of user 1000 dumped core.
                
                Stack trace of thread 420016:
                #0  0x000055b900db7e06 zhalloc (/usr/bin/zsh + 0x6ae06)
                #1  0x000055b900d819de n/a (/usr/bin/zsh + 0x349de)
                #2  0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #3  0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #4  0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #5  0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #6  0x000055b900d8c799 runshfunc (/usr/bin/zsh + 0x3f799)
                #7  0x000055b900d8ceda doshfunc (/usr/bin/zsh + 0x3feda)
                #8  0x000055b900d8e5b4 n/a (/usr/bin/zsh + 0x415b4)
                #9  0x000055b900d85c70 n/a (/usr/bin/zsh + 0x38c70)
                #10 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #11 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #12 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #13 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #14 0x000055b900d8c799 runshfunc (/usr/bin/zsh + 0x3f799)
                #15 0x000055b900d8ceda doshfunc (/usr/bin/zsh + 0x3feda)
                #16 0x000055b900d8e5b4 n/a (/usr/bin/zsh + 0x415b4)
                #17 0x000055b900d85c70 n/a (/usr/bin/zsh + 0x38c70)
                #18 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #19 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #20 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #21 0x000055b900dbc99f execif (/usr/bin/zsh + 0x6f99f)
                #22 0x000055b900d840ed n/a (/usr/bin/zsh + 0x370ed)
                #23 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #24 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #25 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #26 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #27 0x000055b900d8c799 runshfunc (/usr/bin/zsh + 0x3f799)
                #28 0x000055b900d8ceda doshfunc (/usr/bin/zsh + 0x3feda)
                #29 0x000055b900d7ce98 n/a (/usr/bin/zsh + 0x2fe98)
                #30 0x000055b900d7d37a n/a (/usr/bin/zsh + 0x3037a)
                #31 0x000055b900d85252 n/a (/usr/bin/zsh + 0x38252)
                #32 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #33 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #34 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #35 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #36 0x000055b900d8a2cf getoutput (/usr/bin/zsh + 0x3d2cf)
                #37 0x000055b900df18ad n/a (/usr/bin/zsh + 0xa48ad)
                #38 0x000055b900df2701 prefork (/usr/bin/zsh + 0xa5701)
                #39 0x000055b900d80101 n/a (/usr/bin/zsh + 0x33101)
                #40 0x000055b900d80a8d n/a (/usr/bin/zsh + 0x33a8d)
                #41 0x000055b900d88bd0 execlist (/usr/bin/zsh + 0x3bbd0)
                #42 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #43 0x000055b900d8c799 runshfunc (/usr/bin/zsh + 0x3f799)
                #44 0x000055b900d8ceda doshfunc (/usr/bin/zsh + 0x3feda)
                #45 0x000055b900d8e5b4 n/a (/usr/bin/zsh + 0x415b4)
                #46 0x000055b900d85c70 n/a (/usr/bin/zsh + 0x38c70)
                #47 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #48 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #49 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #50 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                #51 0x000055b900d8c799 runshfunc (/usr/bin/zsh + 0x3f799)
                #52 0x000055b900d8ceda doshfunc (/usr/bin/zsh + 0x3feda)
                #53 0x000055b900d8e5b4 n/a (/usr/bin/zsh + 0x415b4)
                #54 0x000055b900d85c70 n/a (/usr/bin/zsh + 0x38c70)
                #55 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #56 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #57 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #58 0x000055b900dbc99f execif (/usr/bin/zsh + 0x6f99f)
                #59 0x000055b900d840ed n/a (/usr/bin/zsh + 0x370ed)
                #60 0x000055b900d862cf n/a (/usr/bin/zsh + 0x392cf)
                #61 0x000055b900d86714 n/a (/usr/bin/zsh + 0x39714)
                #62 0x000055b900d88646 execlist (/usr/bin/zsh + 0x3b646)
                #63 0x000055b900d88e3e execode (/usr/bin/zsh + 0x3be3e)
                ELF object binary architecture: AMD x86-64

Steps to Reproduce

Open claude code, ask it to run any shell command using the Bash tool

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.12 and 2.1.14 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Kitty

Additional Information

<img width="1541" height="220" alt="Image" src="https://github.com/user-attachments/assets/db4d3208-4ca0-43a2-8dc1-17b48f1b920d" />

View original on GitHub ↗

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