Skip to content

JSON code blocks strip quotation marks in TUI markdown renderer #8222

Closed

Description

@jhogstrom

Environment:

  • OpenCode version: 1.1.16
  • Terminal: bash with xterm-256color
  • OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • Interface: OpenCode TUI

Description:

When the assistant responds with JSON code blocks in the OpenCode TUI, double quotation marks are not rendered/displayed, making the JSON examples appear invalid and confusing for users.

Steps to Reproduce:

  1. Launch OpenCode TUI in bash terminal
  2. Ask the assistant a question about JSON configuration (e.g., "how do I configure opencode.json?")
  3. Observe the JSON code blocks in the response

Expected Behavior:
JSON code blocks should display with proper quotation marks around keys and values:

{
  "key": "value"
}

Actual Behavior:
JSON code blocks display without quotation marks:

{
  key: value
}

Additional Context:

  • Quotation marks appear correctly in regular text and bullet lists
  • The issue only affects code blocks (specifically JSON, but may affect other languages)
  • This makes it impossible to show valid JSON syntax to users
  • The assistant's response likely contains the quotes, but the TUI markdown renderer strips them during display

Impact:

  • High - Makes it difficult to provide accurate JSON configuration examples
  • Users may copy invalid JSON syntax
  • Creates confusion about proper JSON formatting

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 13, 2026
  2. github-actions commented on Jan 13, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. jhogstrom commented on Jan 13, 2026

    @jhogstrom
    Author

    Looking at #5591 it turns out that Toggle code concealment does indeed reveal the quotation marks, but that's not a very obvious solution. Feel free to mark this as a duplicate.

  4. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions