claude-code - 💡(How to fix) Fix Markdown renderer errors on [[double-bracket]] wikilink syntax in tool call output [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#45321Fetched 2026-04-09 08:08:03
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Claude Code's terminal markdown renderer fails to handle an AST node when rendering bash tool call content that contains [[double-bracket]] wikilink syntax. The error message Unhandled node type: string appears between Claude's output text and the permission prompt. Any bash tool call whose command text contains [[double-bracket]] wikilink syntax triggers the error. For example, a heredoc writing Obsidian-style markdown with [[wikilinks]]: Screenshot showing the error

Note: Screenshot available but cannot be uploaded via CLI. The error Unhandled node type: string appears directly after rendered markdown containing [[wikilink]] syntax, just before the permission prompt. Cosmetic only — tool execution is not affected, writes succeed. But the error message is confusing and clutters the output.

Code Example

obs_put "Page Name" "$(cat <<'PAGEEOF'
## Sources
- [[Gemma]]Google DeepMind open-weight model family
- [[Qwen3-TTS]]Alibaba/Qwen open-weight speech synthesis family
- [[vLLM]] — high-throughput inference engine
PAGEEOF
)"
RAW_BUFFERClick to expand / collapse

Bug Description

Claude Code's terminal markdown renderer fails to handle an AST node when rendering bash tool call content that contains [[double-bracket]] wikilink syntax. The error message Unhandled node type: string appears between Claude's output text and the permission prompt.

Reproduction

Any bash tool call whose command text contains [[double-bracket]] wikilink syntax triggers the error. For example, a heredoc writing Obsidian-style markdown with [[wikilinks]]:

obs_put "Page Name" "$(cat <<'PAGEEOF'
## Sources
- [[Gemma]] — Google DeepMind open-weight model family
- [[Qwen3-TTS]] — Alibaba/Qwen open-weight speech synthesis family
- [[vLLM]] — high-throughput inference engine
PAGEEOF
)"

Expected Behavior

The tool call content should render without errors.

Actual Behavior

The message Unhandled node type: string is displayed between the rendered output and the "Do you want to proceed?" permission prompt.

Screenshot

Screenshot showing the error

Note: Screenshot available but cannot be uploaded via CLI. The error Unhandled node type: string appears directly after rendered markdown containing [[wikilink]] syntax, just before the permission prompt.

Impact

Cosmetic only — tool execution is not affected, writes succeed. But the error message is confusing and clutters the output.

Environment

  • Claude Code CLI (Linux)
  • Triggered by CommonMark renderer encountering non-standard [[...]] markdown syntax in tool call output

extent analysis

TL;DR

The issue can be resolved by modifying the CommonMark renderer to handle the non-standard [[double-bracket]] wikilink syntax or by escaping the brackets in the markdown content.

Guidance

  • Identify the specific part of the CommonMark renderer that is causing the error and update it to recognize the [[double-bracket]] syntax as a valid wikilink.
  • Consider adding a preprocessing step to escape the [[double-bracket]] syntax in the markdown content before passing it to the renderer.
  • Verify that the error is indeed caused by the [[double-bracket]] syntax by testing the renderer with different inputs.
  • If the issue is specific to the Claude Code CLI, check if there are any configuration options or updates available that may address the problem.

Example

# Escaping the brackets as a temporary workaround
obs_put "Page Name" "$(cat <<'PAGEEOF'
## Sources
- \[\[Gemma\]\] — Google DeepMind open-weight model family
- \[\[Qwen3-TTS\]\] — Alibaba/Qwen open-weight speech synthesis family
- \[\[vLLM\]\] — high-throughput inference engine
PAGEEOF
)"

Notes

The solution may require modifications to the CommonMark renderer or the Claude Code CLI, and may involve updating dependencies or configuration files. The exact steps will depend on the specific implementation and requirements of the project.

Recommendation

Apply a workaround, such as escaping the brackets, until a more permanent solution can be implemented, as this will allow the tool to function without displaying the error message.

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