[Bug]: Codex `:codex-file-citation{…}` inline directives leak verbatim into rendered assistant messages
Version: Claudian 2.2.6 · Obsidian 1.13.7 · macOS · provider: Codex (gpt-5.6 family)
What happens When the Codex provider answers with a file citation, the raw directive is shown in the chat bubble:
…the last sentence of the answer.:codex-file-citation{path="/Users/<me>/<vault>/Lectures/Chapter-2.pdf" purpose="source"}Why
Codex 5.6-series models are instructed by their system prompt to cite sources with the inline form :codex-file-citation{path="…" purpose="source"} (also seen: artifact_kind="document" page_number="4", and the older :codex-file-citation[codex-file-citation]{line_range_start=… path=…}). Codex's own TUI strips/renders it (codex-rs/tui/src/markdown_render/file_citations.rs), but Claudian passes the text straight to MarkdownRenderer.render, and the 2.2.6 bundle contains no handling of codex-file-citation at all.
Expected
Either strip the directive, or render it as a link to the vault file (vault-relative path; #page=N for PDFs when page_number is present), the way the existing "Memory used" citation block is rendered.
Workaround I'm using
A tiny companion plugin with a registerMarkdownPostProcessor that rewrites text nodes matching
/:codex-file-citation(?:\[[^\]]*\])?\{((?:[^{}"]|"(?:[^"\\]|\\.)*")*)\}/g into an internal-link. Happy to turn it into a PR if you want it in MessageRenderer.
Source: YishenTu/claudian