ui: name the backend that is actually answering - #6
Merged
Merged
Conversation
The prompt said "Ask Claude…", the reply label said claude, the approval bar said "claude wants:" and the header said "Claude on your Max plan" — while codex was answering. Each site wrote the name out, so adding a backend left all four wrong. agentname.go is now the one place a backend is named, and the model carries which one it is. A third backend is a case in one switch rather than a hunt for string literals. Looking for the same shape rather than the same symptom found three more: - /model offered opus, sonnet and haiku on codex. Those are rows that cannot be selected. codex names its models outright, so model/list is fetched at Initialize and forwarded as a frame — a request's reply never reaches the adapter otherwise — and the fallback is per backend. - ctrl+r mixed both backends' sessions. Resuming a claude session under codex hands thread/resume an id it has never seen. sessionInfo now records the backend, and the claude-only filesystem source is skipped elsewhere. Records written before there was a second backend carry no value, and empty means claude, so nothing needs migrating. - @path is NOT expanded by codex. Probing both showed claude injects the file's contents while codex sees only the text and must read the file itself, so the help line differs per backend rather than asserting claude's behaviour twice. Still claude-only and still offered on codex: /sysprompt and /mcp. Those need a capability set rather than a label, so they are left for that work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs reported from a live codex session, plus three more of the same shape found by looking for the shape rather than the symptom.
Reported
The prompt placeholder said "Ask Claude…" and
/modeloffered claude's aliases, while codex was answering.The origin
Each site wrote the agent's name out as a literal — placeholder, reply label, approval bar, header tagline. Adding a backend left all four wrong at once.
agentname.gois now the single place a backend is named, and the model carries which one it is, so a third backend is a case in one switch.Three more of the same shape
/modelfallback offeredopus/sonnet/haikumodel/listat Initialize and forwards it as a frame, because a request's reply never reaches the adapterctrl+rmixed both backends' sessionsthread/resumean id it has never seen.sessionInfonow records the backend@pathis not expanded by codexThe session field is empty for every record written before there was a second backend, and empty means claude, so nothing needs migrating.
Verified
go vet, full suite, and live against the real CLI:TestCodexLiveModelListReachesThePickershows the real catalogue reaching the picker (GPT-6-Astra, GPT-5.6-Sol, …) and asserts no claude alias appears.Left deliberately
/syspromptand/mcpare claude-only and still offered on codex. Those need a capability set rather than a label, so they belong with that work rather than here.