claude-code - 💡(How to fix) Fix [BUG] "unhandled node type $" [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49483Fetched 2026-04-17 08:39:53
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×6

Error Message

I'd expect the usual ask for permissions, not this odd error.

Error Messages/Logs

Code Example

go test -run TestScript/plugin_build$ ./cmd/cue/cmd

---

Unhandled node type: $

---

All relevant output included above.

---

Please run a shell echo command with a '$' at the end of the first argument and no quotes
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When Claude tries to run a shell command with a $ at the end of an argument, for example this command:

go test -run TestScript/plugin_build$ ./cmd/cue/cmd

it prints:

Unhandled node type: $

and then always asks for permission even when I've previously granted it a command very similar or identical. Here's screenshot of an example:

<img width="844" height="291" alt="Image" src="https://github.com/user-attachments/assets/5239402b-2899-4681-803c-9f395ecfe6a0" />

It seems like the Claude shell syntax parser is treating $ at the end of an argument as special, when it's not.

What Should Happen?

I'd expect the usual ask for permissions, not this odd error.

Error Messages/Logs

All relevant output included above.

Steps to Reproduce

Run claude and type:

Please run a shell echo command with a '$' at the end of the first argument and no quotes
<img width="935" height="515" alt="Image" src="https://github.com/user-attachments/assets/541d7086-00a0-4dad-9d94-8748c7f4beab" />

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.112 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The issue can likely be fixed by properly escaping or quoting the shell command argument containing the $ character to prevent the Claude shell syntax parser from treating it as special.

Guidance

  • Verify that the issue is indeed caused by the $ character at the end of the argument by trying the command with the $ removed or escaped (e.g., \$).
  • Try quoting the entire argument containing the $ character to prevent special character interpretation, for example: go test -run "TestScript/plugin_build$" ./cmd/cue/cmd.
  • Check the Claude documentation for any specific guidance on handling special characters in shell commands.
  • If the issue persists, try reporting the problem with a minimal example that demonstrates the issue, as the provided screenshots may not be accessible.

Example

# Example of quoting the argument to prevent special character interpretation
go test -run "TestScript/plugin_build$" ./cmd/cue/cmd

Notes

The provided information suggests that this is a regression, but without knowing the last working version, it's difficult to pinpoint the exact cause. The fix may involve updating the Claude Code version or modifying the shell command syntax.

Recommendation

Apply workaround: quoting the argument containing the $ character, as it is a non-invasive and straightforward solution that can potentially resolve the issue without requiring a version update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] "unhandled node type $" [1 participants]