claude-code - 💡(How to fix) Fix [FEATURE] Add native markdown rendering [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#45111Fetched 2026-04-09 08:13:00
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2

Code Example

┌──────────────┬───────┬──────────┬──────────────────────────────┐
ComponentScoreVolumeNotes├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-a    │ 26.0  │ 421K     │ Already optimized            │
├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-b    │ 13.0  │ 722K     │ Strongest remaining candidate│
├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-c    │ 26.0  │ 134K     │ Worth investigating          │
└──────────────┴───────┴──────────┴──────────────────────────────┘

---

| Component | Score | Volume | Notes |
|---|---|---|---|
| service-a | 26.0 | 421K | Already optimized |
| service-b | 13.0 | 722K | Strongest remaining candidate |
| service-c | 26.0 | 134K | Worth investigating |
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Problem

When Claude wants to display a table, it generates box-drawing characters (┌─┬─┐, , ├─┼─┤, etc.) token by token. This is expensive:

  • A 6-row, 4-column table is ~1800 chars as box-drawing vs ~600 chars as markdown — 3x more output tokens
  • Each box-drawing character (, , , etc.) is its own token
  • The model has to compute column widths and alignment padding across all rows before it can start emitting — wasted compute for an autoregressive model that can't look ahead

Impact

Tables are common in Claude Code output (comparisons, summaries, data analysis). Saving ~2/3 of tokens on every table adds up, especially in long sessions. Beyond tokens, removing the alignment computation lets the model focus on content.

Related issues

  • #16772 — requested table rendering style options (auto-closed, no response)
  • #44696 — wide markdown tables collapsing into unusable card format
  • #44422 — plan dialog overlapping table content

Proposed Solution

The model should output markdown tables as the canonical format, and the client should handle rendering:

  • TUI: Render markdown tables as box-drawing art (trivial — ~50 lines of Python, I have a working prototype)
  • Claude Desktop / web: Render as HTML tables
  • IDE extensions: Render using whatever the IDE supports

This cleanly separates content from presentation. The model produces the data, each client renders it appropriately for its medium.

Alternative Solutions

I tried having the model write a markdown table to a temp file, then pipe it through a formatting script. This works, but Bash tool output gets truncated in the TUI ("... +N lines, ctrl+o to expand"), which defeats the purpose. There's no setting to control this truncation.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Use case example

I asked Claude Code to research some data and summarize findings. It produced a comparison table:

┌──────────────┬───────┬──────────┬──────────────────────────────┐
│ Component    │ Score │ Volume   │ Notes                        │
├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-a    │ 26.0  │ 421K     │ Already optimized            │
├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-b    │ 13.0  │ 722K     │ Strongest remaining candidate│
├──────────────┼───────┼──────────┼──────────────────────────────┤
│ service-c    │ 26.0  │ 134K     │ Worth investigating          │
└──────────────┴───────┴──────────┴──────────────────────────────┘

The identical content as a markdown table:

| Component | Score | Volume | Notes |
|---|---|---|---|
| service-a | 26.0 | 421K | Already optimized |
| service-b | 13.0 | 722K | Strongest remaining candidate |
| service-c | 26.0 | 134K | Worth investigating |

The box-drawing version is 3x the characters, and the model had to compute that every column lines up perfectly before emitting the first character. If the TUI rendered the markdown table visually, the user sees the same pretty output while the model only pays for the compact format.

Additional Context

No response

extent analysis

TL;DR

Output markdown tables from the model and render them as box-drawing art or HTML tables on the client-side to reduce token count and improve performance.

Guidance

  • Identify the current table generation code in the model and modify it to produce markdown tables instead of box-drawing characters.
  • Develop a rendering mechanism on the client-side (TUI, Claude Desktop, web, IDE extensions) to convert markdown tables into the desired visual format.
  • Test the new implementation with various table sizes and contents to ensure correct rendering and performance improvements.
  • Consider adding an option to toggle between markdown and box-drawing table formats for users who prefer the original style.

Example

| Component | Score | Volume | Notes |
|---|---|---|---|
| service-a | 26.0 | 421K | Already optimized |
| service-b | 13.0 | 722K | Strongest remaining candidate |
| service-c | 26.0 | 134K | Worth investigating |

This markdown table can be rendered as box-drawing art or an HTML table on the client-side.

Notes

The proposed solution assumes that the client-side rendering mechanism can handle markdown tables correctly. Additional testing may be required to ensure compatibility with different clients and table formats.

Recommendation

Apply the workaround of outputting markdown tables from the model and rendering them on the client-side, as it reduces token count and improves performance without requiring significant changes to the existing codebase.

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