Repository navigation
Show Codex web search citations as links to their sources #34919
LetterXbox
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hiding citations also hides their sources
When Codex answers with web search, it puts a citation marker after each claim: U+E200
citeU+E202turn953851view0U+E201. T3 shows these markers as raw text such asciteturn953851view0(#30979). #31053 hides the markers, so the raw text is gone, but the reader can no longer see which source supports a claim. The expected behavior in #30979 asks for "readable, clickable references".Example from one of my threads
A Codex reply ended a sentence with a citation. T3 rendered it like this:
Earlier in the same turn, Codex had opened that page with
web_run. T3 stored the tool output on the turn item, and the result header names the same id:With this proposal, the sentence would end with a link to
https://usemagpie.ai/instead of the raw marker.T3 already has the data
codex_apps.search_service.web_run. T3 stores its output inoutput[].texton the turn item.Title (URL)line, followed by its id in brackets, for example【turn953851view0】. The citation marker in the reply refers to that id.OrchestrationV2WebSearchResultalready hastitleandurlfields. The Claude adapter fills them from Claude's web search output. The Codex adapter'sweb_searchitems carry onlypatterns.packages/shared/src/codexMarkdownDirectives.tshandles citation markers for web, mobile (renderCodexMarkdownForNativeDisplay), and copy (renderCodexDirectivesForCopy). One change there reaches all three.Every citation in my threads matches one URL
My T3 database has 4 Codex threads with web citations. All 21 citation ids in them (17 distinct) match exactly one URL from a
web_runoutput in the same thread. No id matches two URLs, and no id is missing. The sources are on 9 different sites.Sessions imported from the Codex app also have markers, but they have no tool items, so their 11 ids cannot be matched. I counted with a read-only script over the projection tables and can share it.
Suggestion
Replace each citation marker whose ids match a source with a small link to that source. The link could show the site name, with the page title on hover. Copy would produce a Markdown link.
If an id does not match, its marker stays hidden, as it is after #31053. Imported sessions get this fallback. If a future version of Codex changes the
web_runoutput format, the parser finds no sources and the markers stay hidden as well.Out of scope: imported sessions, the separate
visualizemarker, and Claude citations.Questions for maintainers
web_runoutput into structured results, for exampleOrchestrationV2WebSearchResultwith an id? Or should clients match ids from the turn items they already have?web_runoutput format. Is it acceptable to parse it and hide the citation when parsing fails, or would you rather wait for Codex to send structured citations?If you approve the direction and scope, I would like to implement this after #31053 merges.
All reactions