[Bug]: Codex artifact citations render as raw codex-file-citation markup #5813
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/web (the separate mobile Markdown renderer may also need equivalent handling)
Steps to reproduce#
- Start T3 Code with the Codex provider.
- Use one of the bundled OpenAI artifact skills, such as
documentsorpdf. - Ask Codex to create a DOCX or PDF.
- Codex emits an artifact citation such as:
Created :codex-file-citation{path="/Users/example/project/output/report.docx" purpose="output"}.
- View the completed assistant message in T3 Code.
Expected behavior#
T3 Code should recognize the artifact citation and render it as a clickable local file chip/link, reusing the existing Markdown file-link resolution and open/preview behavior.
The purpose="source" / purpose="output" metadata could be preserved if useful, but a clickable file link would be enough for the smallest fix.
Actual behavior#
The complete directive is displayed literally in the assistant message:
:codex-file-citation{path="..." purpose="output"}
It is not clickable, so the user must copy the path manually or ask Codex to repeat the result using ordinary Markdown.
Impact#
Minor bug or occasional failure. It is consistent whenever these bundled artifact skills use this output format, and it makes generated deliverables look broken even though the files were created successfully.
Version or commit#
- T3 Code Nightly:
0.0.33-nightly.20260809.1041 - Current upstream inspected:
963ebf5bd7cce00d40ff60c258b34c12dcab271e - Codex CLI:
0.146.0 - OpenAI primary-runtime artifact skills:
26.805.11740
Environment#
- macOS 27.0
- Apple Silicon / arm64
- T3 Code desktop app
- Codex provider
Supporting evidence#
- Before investigating, this occurred in six assistant messages across three unrelated threads between 1 August and 9 August 2026.
- The installed packaged app has no
codex-file-citationhandler. - The current upstream source also has no match for that token or a Markdown directive plugin.
- The existing renderer extracts conventional Markdown links and already has local file-chip behavior: https://github.com/pingdotgg/t3code/blob/963ebf5bd7cce00d40ff60c258b34c12dcab271e/apps/web/src/components/ChatMarkdown.tsx#L1278-L1292
- Existing file-link UX was added in https://github.com/pingdotgg/t3code/pull/1956
This indicates a renderer compatibility gap rather than a machine-specific setting.
Possible implementation direction#
Parse this directive into the existing local-file link metadata/component rather than creating a separate file-opening path. Relevant cases to test:
- streamed/incomplete directives
- spaces, quotes and parentheses in paths
sourceandoutputpurposes- paths outside the workspace
- desktop/web and mobile rendering
- existing path validation and sanitization
Workaround#
Explicitly ask Codex to also provide ordinary Markdown links, for example:
[report.docx](/Users/example/project/output/report.docx)
The bundled artifact skills currently request the special citation form, so this requires an additional user instruction.
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Fixed by #8584