Bash tool approval dialog: 'Unhandled node type: string' from tree-sitter bash renderer

Resolved 💬 3 comments Opened Apr 15, 2026 by marcdhansen Closed Apr 19, 2026

Summary

When the Bash tool approval dialog renders a bash command containing certain syntax patterns, the tree-sitter bash syntax highlighter throws Unhandled node type: string. The error appears inline in the approval UI, requiring the user to acknowledge it before the command can proceed.

Reproduction

Run a bash command that includes one or more of these patterns in the approval dialog:

  • Single-quoted strings as command arguments (e.g. --jq '.object.sha')
  • Unicode characters in double-quoted strings (e.g. echo "✓ verified" or echo "✗ PUSH FAILED")
  • Long multi-line commands chained with && and backslash continuation

Example command that reliably triggers it:

LOCAL=$(git rev-parse HEAD) && \
REMOTE=$(gh api repos/owner/repo/git/refs/heads/$(git branch --show-current) --jq '.object.sha') && \
[ "$LOCAL" = "$REMOTE" ] && echo "✓ verified" || echo "✗ PUSH FAILED — do not proceed"

Expected behavior

The approval dialog renders the bash command with syntax highlighting (or no highlighting) without surfacing an error to the user.

Actual behavior

The dialog shows Unhandled node type: string as an error message that the user must acknowledge, creating repeated interruptions.

Impact

Every time an agent runs a push-verify command pattern like the above, the user is prompted to address the error. In workflows where push verification runs frequently, this becomes persistent noise.

Notes

  • The command still executes correctly — this is a rendering-only bug
  • Likely the tree-sitter-bash grammar does not handle the string AST node in all positions
  • Workaround: use simpler bash commands that avoid the triggering syntax patterns

Environment

  • Platform: macOS (darwin 25.4.0)
  • Claude Code CLI

View original on GitHub ↗

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