claude-code - 💡(How to fix) Fix "Unhandled node type: pipeline" in permission prompt [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#47752Fetched 2026-04-15 06:43:15
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Root Cause

The static bash analyzer uses tree-sitter to walk the AST. The fallback handler Fz returns "Unhandled node type: ${H.type}" for node types not covered by the switch/case dispatchers. pipeline is handled at the top level (it's in the Sq1 set), but in this specific nesting context it reaches the fallback.

Fix Action

Fix / Workaround

The static bash analyzer uses tree-sitter to walk the AST. The fallback handler Fz returns "Unhandled node type: ${H.type}" for node types not covered by the switch/case dispatchers. pipeline is handled at the top level (it's in the Sq1 set), but in this specific nesting context it reaches the fallback.

Code Example

cat <<'EOF' | FOO=bar wc -l
hello
EOF

---

Bash command

   cat <<'EOF' | FOO=bar wc -l
   hello
   EOF
   Reproduce heredoc pipe with env var prefix

 Unhandled node type: pipeline

 Do you want to proceed?
RAW_BUFFERClick to expand / collapse

Bug

The permission prompt shows Unhandled node type: pipeline when a bash command combines a heredoc with a pipe to a command that has an environment variable prefix.

Repro

Any bash command matching this pattern:

cat <<'EOF' | FOO=bar wc -l
hello
EOF

The permission prompt renders as:

 Bash command

   cat <<'EOF' | FOO=bar wc -l
   hello
   EOF
   Reproduce heredoc pipe with env var prefix

 Unhandled node type: pipeline

 Do you want to proceed?

Simple pipes (cmd1 | cmd2) do not trigger this. The combination of heredoc + pipe + env var assignment on the right-hand side is required.

Root cause

The static bash analyzer uses tree-sitter to walk the AST. The fallback handler Fz returns "Unhandled node type: ${H.type}" for node types not covered by the switch/case dispatchers. pipeline is handled at the top level (it's in the Sq1 set), but in this specific nesting context it reaches the fallback.

Environment

  • Claude Code 2.1.105
  • macOS (Darwin 25.4.0)

extent analysis

TL;DR

The issue can be worked around by reordering the bash command to avoid the heredoc and pipe combination with an environment variable prefix.

Guidance

  • Verify that the issue is specific to the combination of heredoc, pipe, and environment variable prefix by testing simpler pipe commands without heredocs or environment variables.
  • Attempt to reorder the command to avoid the problematic pattern, such as setting the environment variable before the heredoc.
  • Investigate updating the static bash analyzer to handle the pipeline node type in the specific nesting context.
  • Test the command in a different environment or version of Claude Code to determine if the issue is version-specific.

Example

FOO=bar cat <<'EOF' | wc -l
hello
EOF

This reordering may avoid the Unhandled node type: pipeline error.

Notes

The issue appears to be specific to the Claude Code 2.1.105 version and the macOS environment. The workaround may not be necessary in other versions or environments.

Recommendation

Apply workaround: Reorder the bash command to avoid the heredoc and pipe combination with an environment variable prefix, as shown in the example. This should mitigate the issue until a more permanent fix is available.

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