You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Markdown tables display as plain text instead of formatted tables #3845
When OpenCode generates a response containing markdown table syntax, the tables are not being rendered as formatted ASCII/text tables in the terminal output. Instead, the raw markdown syntax is displayed.
Expected Behavior
When the AI assistant outputs a comparison table or any tabular data, it should render as a properly formatted text-based table with borders and alignment in the terminal.
Actual Behavior
The raw markdown table syntax is displayed as-is in the terminal, making it difficult to read the comparison data.
Additional Context
Tested with GitHub Copilot provider
Using OpenCode version 1.0.16
Mac OS 26.0.1 with Kitty terminal
OpenCode version
1.0.16
Steps to reproduce
Go to model selector
Select any model that you have active subscription to (tested with GitHub Copilot)
Ask it to output a comparison table (e.g., "compare GPT-4 vs Claude")
Raw markdown text gets displayed instead of formatted table
Screenshot and/or share link
Operating System
Mac os 26.0.1
Terminal
Kitty terminal
Reacted by Antón Valladares, Hung Ton, Luigi Maselli, Davasny, H0llyW00dzZ, 1teenarp, Mikhail Lukianchenko, Winston Yee, Andrej Kurocenko, petek and 44 more
Hi, I started tinkering as this issue was bothering me recently. I'll be happy to take a crack at it, but there is a design decision to make here, both in regards to styling and in regards to handling of tables that overflow
In general I thought to follow a similar direction to the way markdown renders work in nvim.
Turning something like this:
To this:
The problem is with large tables.
In raw form they currently render like this: (messed up but somewhat readable)
One possible direction to take here is to truncate columns based on the terminal's width:
But then that require "teaching" the user to turn off code concealement to see the full text (which can be added as a hint below a truncated table)
But maybe there is a better direction I'm missing. I thought of horizontal scrolling but that seems very unintuitive (and I'm not sure how well it works in terminals).
Another option is just to truncate whole columns and leave only the first and last columns - but that feels too disruptive and will force the user to turn off concealement every time.
In regards to styling - I honestly like the plain style. But I can see a potential to extend the themes with colors and styles for headings, seperators, etc.
Anyways - I'm just playing around. If you would like me to continue in this direction and open a PR, let me know and I'll be happy to help.
Reacted by internalG, Henrik Klee, Thomas Liu, leolulu, netlesh, Ángel Cervera Claudio, Bolat Sherniyaz and hackerman
Reacted by Shrikrishna Joisa, Shoaib Khan, cc-bjojac, H0llyW00dzZ, Shoaib Khan, Andrej Kurocenko, Gabriel Nascimento and netlesh
Seems like copilot cli can't handle overflowing tables as well. In this case, I wonder if it's technically possible to let table occupy full width(or not) and then wrap lines in cells. Like how glow does it:
Reacted by Tommy D. Rossi, petek, pdejong-sieval, shekohex, Stephan Maximilian Huber, François Rouault, Henrik Klee, Thomas Liu, leolulu, seanmamasde and 2 more
Environment: Multiple (both native Linux clients + Windows 11 with WSL), both when running locally and when running on a different host (ssh). OpenCode 1.0.168 with Claude.
Until a fix is implemented, I have created a workaround based on my previous comment. Instruct your agents to pad table contents with something like this:
When outputting markdown tables, always pad cell contents so that all cells in the same column have exactly the same character width.
Until a fix is implemented, I have created a workaround based on my previous comment. Instruct your agents to pad table contents with something like this:
When outputting markdown tables, always pad cell contents so that all cells in the same column have exactly the same character width.
Fantastic, thanks! I didn't fancy the output for the separator in tables too much, so I forked it and created my own to mimic my desired output from the latest screenshot above.
Activity
github-actions commentedon Nov 3, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
maxandron commentedon Nov 11, 2025
Hi, I started tinkering as this issue was bothering me recently. I'll be happy to take a crack at it, but there is a design decision to make here, both in regards to styling and in regards to handling of tables that overflow
In general I thought to follow a similar direction to the way markdown renders work in nvim.
Turning something like this:
To this:
The problem is with large tables.
In raw form they currently render like this: (messed up but somewhat readable)
One possible direction to take here is to truncate columns based on the terminal's width:
But then that require "teaching" the user to turn off code concealement to see the full text (which can be added as a hint below a truncated table)
But maybe there is a better direction I'm missing. I thought of horizontal scrolling but that seems very unintuitive (and I'm not sure how well it works in terminals).
Another option is just to truncate whole columns and leave only the first and last columns - but that feels too disruptive and will force the user to turn off concealement every time.
In regards to styling - I honestly like the plain style. But I can see a potential to extend the themes with colors and styles for headings, seperators, etc.
Anyways - I'm just playing around. If you would like me to continue in this direction and open a PR, let me know and I'll be happy to help.
grigio commentedon Nov 17, 2025
+1 probably the best way to implement it is to toggle with a shortcut the markdown/text rendering
H0llyW00dzZ commentedon Dec 2, 2025
+1
remorses commentedon Dec 2, 2025
Working on a PR in opentui anomalyco/opentui#369
66Leo66 commentedon Dec 4, 2025
Seems like copilot cli can't handle overflowing tables as well. In this case, I wonder if it's technically possible to let table occupy full width(or not) and then wrap lines in cells. Like how glow does it:
Regboy744 commentedon Dec 18, 2025
Hi, does anyone found out how to fix this bug on the table rendering ? It is been there for a while. thanks
eivamu commentedon Dec 19, 2025
Same issue.
Example output:
Example of what it should look like imo:
Environment: Multiple (both native Linux clients + Windows 11 with WSL), both when running locally and when running on a different host (ssh). OpenCode 1.0.168 with Claude.
Would be fantastic if this was fixed.
eivamu commentedon Dec 19, 2025
Temporary workaround
Until a fix is implemented, I have created a workaround based on my previous comment. Instruct your agents to pad table contents with something like this:
I've added it myself to my
CLAUDE.md.66Leo66 commentedon Dec 19, 2025
I think there's https://github.com/franlol/opencode-md-table-formatter for that.
eivamu commentedon Dec 19, 2025
Fantastic, thanks! I didn't fancy the output for the separator in tables too much, so I forked it and created my own to mimic my desired output from the latest screenshot above.
https://github.com/eivamu/opencode-md-table-formatter
feat(opencode): enhanced markdown renderer with tables, themes, and s…