Skip to content

ui: name the backend that is actually answering - #6

Merged
tdwd merged 1 commit into
mainfrom
codex-ui-labels
Sep 8, 2026
Merged

ui: name the backend that is actually answering#6
tdwd merged 1 commit into
mainfrom
codex-ui-labels

Conversation

@tdwd

@tdwd tdwd commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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 /model offered 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.go is 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

what why it matters
/model fallback offered opus/sonnet/haiku rows codex cannot select. Now fetches model/list at Initialize and forwards it as a frame, because a request's reply never reaches the adapter
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
@path is not expanded by codex claude injects the file's contents; codex sees only the text. Probed both. The help line now differs per backend

The 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: TestCodexLiveModelListReachesThePicker shows the real catalogue reaching the picker (GPT-6-Astra, GPT-5.6-Sol, …) and asserts no claude alias appears.

Left deliberately

/sysprompt and /mcp are 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.

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.
@tdwd
tdwd merged commit 5daa035 into main Sep 8, 2026
1 check passed
@tdwd
tdwd deleted the codex-ui-labels branch September 8, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant