<think> tags not properly parsed into block #3234

Closed
opened 2026-02-16 17:39:15 -05:00 by yindo · 5 comments
Owner

Originally created by @nicosuave on GitHub (Dec 1, 2025).

Description

(Opus 4.5 via Claude Code auth)

Seeing <thinking> tags in Claude Code output. No idea what layer the issue lies at.

Also an agent response looks wrapped in <system_prompt> tags; could be related

OpenCode version

1.0.126

Steps to reproduce

N/A

Screenshot and/or share link

Image Image

Operating System

macOS 26.0.1

Terminal

Ghostty

Originally created by @nicosuave on GitHub (Dec 1, 2025). ### Description (Opus 4.5 via Claude Code auth) Seeing `<thinking>` tags in Claude Code output. No idea what layer the issue lies at. Also an agent response looks wrapped in `<system_prompt>` tags; could be related ### OpenCode version 1.0.126 ### Steps to reproduce N/A ### Screenshot and/or share link <img width="143" height="65" alt="Image" src="https://github.com/user-attachments/assets/e6c7a4b6-0735-4d46-b1e5-9e683cc74e19" /> <img width="96" height="107" alt="Image" src="https://github.com/user-attachments/assets/b29bd3ab-afdc-4972-9bfd-88b62e4768cc" /> ### Operating System macOS 26.0.1 ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:39:15 -05:00
yindo closed this issue 2026-02-16 17:39:15 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 1, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4530: Tools Fail to Unescape XML Entities - This is also about XML/tag parsing where escaped content (like &amp;&amp; and \n) is not being properly unescaped before being processed/rendered, which could be related to how <think> tags are being handled.

Feel free to ignore if your specific case about <think> tags and <system_prompt> tags differs from the XML entity unescaping issue.

@github-actions[bot] commented on GitHub (Dec 1, 2025): This issue might be a duplicate of existing issues. Please check: - #4530: Tools Fail to Unescape XML Entities - This is also about XML/tag parsing where escaped content (like `&amp;&amp;` and `\n`) is not being properly unescaped before being processed/rendered, which could be related to how `<think>` tags are being handled. Feel free to ignore if your specific case about `<think>` tags and `<system_prompt>` tags differs from the XML entity unescaping issue.
Author
Owner

@rekram1-node commented on GitHub (Dec 1, 2025):

in claude code output? wdym

@rekram1-node commented on GitHub (Dec 1, 2025): in claude code output? wdym
Author
Owner

@nicosuave commented on GitHub (Dec 1, 2025):

This is OpenCode. Oh wasn't sure if response format from Anthropic is different if authed with Anthropic / Claude Code auth.

@nicosuave commented on GitHub (Dec 1, 2025): This is OpenCode. Oh wasn't sure if response format from Anthropic is different if authed with Anthropic / Claude Code auth.
Author
Owner

@rekram1-node commented on GitHub (Dec 1, 2025):

what model are you using that outputted think tags?

@rekram1-node commented on GitHub (Dec 1, 2025): what model are you using that outputted think tags?
Author
Owner

@nicosuave commented on GitHub (Dec 1, 2025):

Oof good call out it was very old Opus (and not 4.5). Fuzzy finder + me not paying attention got me.

@nicosuave commented on GitHub (Dec 1, 2025): Oof good call out it was very old Opus (and not 4.5). Fuzzy finder + me not paying attention got me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3234