Skip to content

Bash command execution hangs intermittently #402

Closed

Description

@matheik

Bug Description
Bash commands don't always work but hang instead. Seems like they sometimes start working after running /compact and then have no issues for a while.

Environment Info

  • Platform: Fedora Silverblue, Distrobox container
  • Terminal: Ghostty/tmux
  • Version: 0.2.35
  • Feedback ID: fff79388-af10-4f63-bbca-daef57bbc59b

Errors

[{"error":"Error: Command failed: /usr/bin/rg --files --glob *.md /var/home/matias/.claude/commands\nrg: /var/home/matias/.claude/commands: IO error for operation on /var/home/matias/.claude/commands: No such file or directory (os error 2)\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at ChildProcess.exithandler (node:child_process:422:12)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess.emit (node:domain:489:12)\n    at maybeClose (node:internal/child_process:1104:16)\n    at Socket.<anonymous> (node:internal/child_process:456:11)\n    at Socket.emit (node:events:518:28)\n    at Socket.emit (node:domain:489:12)\n    at Pipe.<anonymous> (node:net:343:12)","timestamp":"2025-03-09T07:46:01.792Z"},{"error":"TypeError: path must not be empty\n    at Tq3 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:68729)\n    at I_ (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:68838)\n    at aM2._test (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:69442)\n    at aM2.ignores (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:69944)\n    at tM2 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:647:230)\n    at xq3 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:645:470)\n    at Object.call (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:643:109)\n    at call.next (<anonymous>)\n    at Z_ (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:91)\n    at file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1057:842","timestamp":"2025-03-09T07:46:02.022Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:800:425)\n    at runNextTicks (node:internal/process/task_queues:60:5)\n    at process.processTimers (node:internal/timers:516:9)\n    at async AU3 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:4146)\n    at async PU1 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:2856)\n    at async r$2 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:428)\n    at async YU3 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:2250)\n    at async s$2 (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:2071)\n    at async TX (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:1613)\n    at async TX (file:///var/home/matias/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:998:1916)","timestamp":"2025-03-09T08:31:35.488Z"}]

Activity

  1. softinio commented on Mar 9, 2025

    @softinio

    FYI #35

  2. odysseus0 commented on Mar 10, 2025

    @odysseus0

    @wolffiex I am also still experiencing the same issue, but on Mac with zsh default shell on Ghostty as well.

    SHELL=/bin/bash claude
    

    fixes it.

  3. matheik commented on Mar 10, 2025

    @matheik
    Author

    Thanks for the input. I saw multiple possibly related issue reports before creating this one, but there seems to be some different conditions.

    Unfortunately SHELL=/bin/bash claude doesn't help in my case. Haven't still figured out a clear pattern on what triggers bash commands to work or not, I'm open to troubleshooting tips.

  4. wolffiex commented on Mar 11, 2025

    @wolffiex
    Collaborator

    we pushed a fix for issues with noclobber that were affecting bash and zsh. please update and let me know if this is fixed in 0.2.37

  5. matheik commented on Mar 15, 2025

    @matheik
    Author

    Haven't encountered the problem anymore for a few days since the update so it seems to be fixed, thanks!

  6. vindavs commented on Jun 3, 2025

    @vindavs

    @wolffiex I'm encountering this with Claude Code 1.0.9, almost every bash command seems to hang.
    My $SHELL is /bin/bash

  7. github-actions commented on Aug 13, 2025

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions