[DOCS] Agent SDK markdown preview docs omit table support
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/agent-sdk/user-input
Section/Topic
AskUserQuestion option previews (previewFormat) in the Agent SDK docs, especially the "Option previews (TypeScript)" section and the TypeScript ToolConfig.askUserQuestion.previewFormat reference.
Current Documentation
The docs currently say:
toolConfig.askUserQuestion.previewFormatadds apreviewfield to each option so your app can show a visual mockup alongside the label. Without this setting, Claude does not generate previews and the field is absent. |previewFormat|previewcontains | | :-------------- | :----------------- | | unset (default) | Field is absent. Claude does not generate previews. | |"markdown"| ASCII art and fenced code blocks | |"html"| A styled<div>fragment ... |
And the TypeScript reference summarizes it as:
|askUserQuestion.previewFormat|'markdown' \| 'html'| Opts into thepreviewfield onAskUserQuestionoptions and sets its content format. When unset, Claude does not emit previews |
What's Wrong or Missing?
Changelog v2.1.113 includes: "Fixed markdown tables breaking when a cell contains an inline code span with a pipe character."
That fix confirms markdown table rendering is a supported user-facing behavior in markdown previews, but the current Agent SDK docs only mention ASCII art and fenced code blocks. They do not tell developers that markdown tables are supported, and they do not provide any example or guidance for table content such as inline code spans containing |.
As written, the docs underspecify what previewFormat: "markdown" can render.
Suggested Improvement
Update the AskUserQuestion preview documentation to explicitly list markdown tables as supported content for previewFormat: "markdown".
Add a small example table to https://code.claude.com/docs/en/agent-sdk/user-input and mirror the capability in the TypeScript reference. A minimal addition would:
- Expand the supported-content description from only "ASCII art and fenced code blocks" to include tables.
- Add a short example showing a markdown table in a preview.
- Note that table cells can include inline code spans, including code containing pipe characters, reflecting the v2.1.113 fix.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/agent-sdk/user-input | Primary explanation of AskUserQuestion previews and the only page that currently describes markdown preview contents |
| https://code.claude.com/docs/en/agent-sdk/typescript | API reference for ToolConfig.askUserQuestion.previewFormat |
Total scope: 2 pages affected
Source: Changelog v2.1.113
Exact changelog entry: Fixed markdown tables breaking when a cell contains an inline code span with a pipe character
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗