Replace Coder Auto with Coder Flash and Coder Free, switched by shift+tab under the input bar #131

Closed AtlantisPleb opened this 1d ago 3 comments

What to build

Retire Coder Auto. Replace it with two named lanes the reader switches between with shift+tab, and show the current one under the input bar — not at the top of the screen, where the lane is announced today and then scrolls away.

Lane Gateway Primary Fallback
Coder Flash Vercel gateway glm-5.3-flash Gemini 3.7 Flash
Coder Free OpenRouter gateway thinkingmachines/inkling ("Inkling") openrouter/free

Two lanes, one key, and the answer to "what am I about to spend, and on what" is in the reader's eyeline the whole time rather than in a line that scrolled off twenty turns ago.

Why the top of the screen is the wrong place

The lane is announced once at session open. That is exactly when it is least interesting — nothing has been asked yet — and by the time it matters, it is off screen. A lane is a live fact, not an opening credit: it changes what the next turn costs and which model answers it, and shift+tab means it can change without the reader having done anything memorable.

Coordination — three changes now claim that row

The row under the input bar is contested. Land this after the other two or expect a rebase:

  • #130 puts identity there — the account and the endpoint — and evicts the token counts to a new /info.
  • #259 (coder autoimprovement lane) puts a credit balance there.
  • This issue puts the lane there.

The rule those two settled on, which this should follow: the bottom row is what you can do next; /info is what you already spent. The lane belongs there under that rule — it is the third thing that governs the next turn, alongside who you are and what you can afford. But three fields plus a lane name is a crowded row at 70 columns, so someone has to decide the layout rather than each change appending to it. #130 already reserves 24 columns on the right for the balance; this needs the same treatment, not an append.

Carry the render constraint too: nothing in that row may report a value it did not receive. For a lane that means the effective model, not the requested one. If Coder Flash fell back to Gemini, the row says so — a lane label that keeps saying "Flash" while a fallback is answering is the same defect as a status bar advertising keys it had not wired.

Two things to check before writing code

Lane::OxAlpha is #[default]. crates/openagents-cli/src/runtime.rs:174. The catalog is being rewritten today: glm-5.3-flash becomes the default, and ox-alpha leaves the selectable list — it was the stealth alias for GLM 5.3 Flash and dies now that model has shipped publicly under its own name. So the default lane is about to name a model that is gone. Whatever this issue does with Auto, it must also move that default, or a fresh session opens on a dead id.

coder-lite has no shift+tab handler. No lane_label, no cycle, no BackTab arm in crates/coder-lite/src/interactive.rs. The precedent to read is the TypeScript CLI's cycleTier, which already walks Flash → Pro → Local (packages/openagents-cli/test/coder-tiers.test.ts). The Rust Lane enum in runtime.rs:174 currently carries Auto, OxAlpha, Flash, Pro, Named, Local — so this is not a new field so much as a decision about which variants survive and what the two survivors are called.

Confirm, don't guess

"Gemini 3.7 Flash" and openrouter/free need their exact ids read off the live catalog before they are written down. GET /api/v1/models is the authority. A fallback that names an id the gateway does not serve fails at the worst possible moment — when the primary is already down — and this repo has shipped a fallback list with a dead entry in it before. Same for thinkingmachines/inkling: confirm the id, then decide separately what the reader sees, which is "Inkling".

Done means

  • Shift+tab switches between Coder Flash and Coder Free, and the row under the input bar changes as it does.
  • The row names the model that actually answered, including after a fallback.
  • No surface still says "Coder Auto".
  • A fresh session does not open on ox-alpha.
  • Tests assert the rendered frame — that the two lanes read differently from each other and from a fallback — not that the label renders something.
  1. AtlantisPleb opened this issue 1d ago
  2. A AtlantisPleb Author 1d ago

    CLAIM
    actor/session: codex-cli-backlog-2026-08-26
    base: 35ac369f9a
    worktree/branch: openagents-cli-backlog (detached worktree)
    scope: Verify the landed Flash/Free lane contract and close the issue if cycling, fallback reporting, and defaults pass.
    paths: read-only audit of crates/openagents-cli/src/runtime.rs, src/coder, and lane tests
    hot contracts: lane catalog resolution, Shift+Tab cycle, footer model attribution
    verification: lane runtime unit tests; rendered identity-row tests; Coder PTY tests
    claimed_at: 2026-08-27T00:46:00Z

  3. A AtlantisPleb Author 1d ago

    CLAIM UPDATE
    The verification exposed a footer-priority regression. Expanding scope to crates/openagents-cli/src/coder/tui.rs and crates/openagents-cli/tests/coder_identity_row.rs: preserve credit and the effective model before optional activity or goal text at narrow widths. Verification remains the runtime, rendered footer, and PTY suites.

  4. A AtlantisPleb Author 1d ago

    CLAIM-RELEASE

    Completed by 12568e4934 and verified on current main. The audit found and fixed one later narrow-footer regression in 4ea97c0bca: optional activity and goal text can no longer evict the credit or effective model.

    Current behavior:

    • A fresh session opens on Coder Flash.
    • Shift+Tab cycles Coder Flash and Coder Free.
    • The footer reports the model that answered, including a fallback.
    • Retired auto, pro, and ox-alpha Coder lane names are not admitted.
    • Narrow footers drop optional progress text before the effective model.

    Verification:

    • Runtime lane unit tests — 32 passed.
    • cargo test -p openagents-cli --test coder_identity_row — 17 passed.
    • Library, Coder frame, and PTY suites — passed; PTY suite 17 passed.
    • cargo check -p openagents-cli --all-targets — passed with one existing test-support dead-code warning.
  5. closed this as completed 1d ago
Sign in with GitHub to comment on this issue.