claude-code - 💡(How to fix) Fix Bug: "Unhandled node type: string" before Bash tool permission prompt (2.1.118) [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#52381Fetched 2026-04-24 06:08:42
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

The literal string Unhandled node type: string is rendered between the Bash tool-call description and the "Do you want to proceed?" permission prompt. It appears to be emitted by the CLI's Markdown/AST renderer when a node type has no handler registered.

The error is cosmetic, not blocking — selecting Yes/Enter still executes the tool call correctly. But it shows up on almost every Bash tool call with even moderately complex commands, making the prompt visually noisy.

Error Message

The error is cosmetic, not blocking — selecting Yes/Enter still executes the tool call correctly. But it shows up on almost every Bash tool call with even moderately complex commands, making the prompt visually noisy.

Error Messages/Logs

Root Cause

The literal string Unhandled node type: string is rendered between the Bash tool-call description and the "Do you want to proceed?" permission prompt. It appears to be emitted by the CLI's Markdown/AST renderer when a node type has no handler registered.

The error is cosmetic, not blocking — selecting Yes/Enter still executes the tool call correctly. But it shows up on almost every Bash tool call with even moderately complex commands, making the prompt visually noisy.

Fix Action

Workaround

None that we've found. Proceeding (Yes/Enter) works; no setting to suppress the renderer output in the prompt is documented.

Code Example

// description: "Redeploy with correct arg passing"
// command: multi-line bash with $(cygpath …), 2>&1, for-loop, printf

---

 (command preview)
Redeploy with correct arg passing

Unhandled node type: string

Do you want to proceed?
> 1. Yes
  2. No

---
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?

Bug: "Unhandled node type: string" before Bash tool permission prompt

Claude Code version: 2.1.118 OS: Windows 11 Enterprise 10.0.26200 Shell: Git Bash (Windows), MSYS2 Terminal: Windows Terminal (verifying — also reproduces in standalone mintty)

Description

The literal string Unhandled node type: string is rendered between the Bash tool-call description and the "Do you want to proceed?" permission prompt. It appears to be emitted by the CLI's Markdown/AST renderer when a node type has no handler registered.

The error is cosmetic, not blocking — selecting Yes/Enter still executes the tool call correctly. But it shows up on almost every Bash tool call with even moderately complex commands, making the prompt visually noisy.

Reproduction

Consistently reproduces when the Bash tool is invoked with:

  • Multi-line commands (\n-separated statements in a single Bash invocation)
  • Command substitution: $(…) or backticks
  • Shell redirects: >, >>, 2>&1
  • for-loops with inline body
  • Chained && / ; with quoted arguments containing $WIN style variables

Example that reproduces reliably

Tool call:

// description: "Redeploy with correct arg passing"
// command: multi-line bash with $(cygpath …), 2>&1, for-loop, printf

The rendered prompt shows:

… (command preview)
Redeploy with correct arg passing

Unhandled node type: string

Do you want to proceed?
> 1. Yes
  2. No

Screenshot: (attach if filing via web)

Expected

No spurious Unhandled node type: string line in the confirmation prompt.

Actual

The line appears roughly in the position where a rendered AST node would be formatted. Suggests the renderer's dispatcher hits a default branch for an AST node of type string without a formatter.

Impact

  • Cosmetic noise in every tool-call confirmation
  • Distracts from the actual command preview
  • Appears to have regressed in a recent 2.1.x release (user reports "seit neuestem")

Workaround

None that we've found. Proceeding (Yes/Enter) works; no setting to suppress the renderer output in the prompt is documented.

Environment

  • claude --version: 2.1.118
  • Platform: win32
  • Invocation: via Claude Code CLI (not agent API)
  • Shell: Git Bash / MSYS2

Notes for maintainers

The renderer appears to format the Bash tool's description or command parameter (or a combination). Logging the offending node path would pinpoint the unhandled type quickly.

What Should Happen?

The message "invalid node tpype: string" should not appear.

Error Messages/Logs

Steps to Reproduce

<img width="706" height="509" alt="Image" src="https://github.com/user-attachments/assets/461ebbf0-1330-4652-b829-3cbe2204e17a" />

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.118

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

extent analysis

TL;DR

The "Unhandled node type: string" error is likely due to the Markdown/AST renderer in Claude Code not handling certain Bash tool call commands correctly, and a potential fix could involve updating the renderer to handle these commands.

Guidance

  • The error appears to be related to the rendering of Bash tool calls with complex commands, such as multi-line commands, command substitution, and shell redirects.
  • To mitigate the issue, try simplifying the Bash tool calls to avoid triggering the unhandled node type error.
  • The Claude Code team may need to update the Markdown/AST renderer to handle the specific node types that are causing the error.
  • Logging the offending node path could help pinpoint the unhandled type quickly.

Example

No code snippet is provided as the issue is related to the Claude Code renderer and not a specific code example.

Notes

The issue appears to be cosmetic and does not block the execution of the Bash tool calls. However, it can cause visual noise and distractions in the confirmation prompt.

Recommendation

Apply workaround: Simplify Bash tool calls to avoid triggering the unhandled node type error, as there is no clear indication of a fixed version 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