--resume sessions: /model picker doesn't load the fetched /v1/models catalog (custom/proxied models missing)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 30, 2026

Environment

  • Claude Code v2.1.286, macOS (darwin)
  • Custom gateway via ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN (Anthropic-shaped API; /v1/models returns 60 custom models with the exact native pagination envelope: data / first_id / has_more: false / last_id)

What happens

Sessions started with --resume show a /model picker containing only:

  • the slot entries (Default, Opus, Fable, Sonnet, Haiku — rendered with the gateway's alias targets, e.g. "Opus: <model> · Proxied to <provider>"), plus
  • the session's currently-selected model (one "Custom model" entry)

The full 60-model catalog is never listed below them, and there is no "+N models" overflow indicator — the picker's model universe in a resumed session appears to contain only those ~7 entries.

Fresh sessions with the same config and the same gateway list the full catalog.

The catalog IS delivered to the resumed session

Gateway access logs show the resumed session fetching GET /v1/models and receiving HTTP 200 with the complete 60-entry payload immediately before the picker is opened — verified repeatedly, including immediately after restarting the same session. The response envelope matches the native API shape. So the data is fetched but never loaded into the picker's model list on the resume path.

Comparison point: a native (non-gateway) session's picker shows the built-in catalog with an overflow indicator ("… +2 models"). The indicator's absence in the resumed/gateway case indicates the catalog isn't being truncated — it never enters the picker's model universe at all.

Reproduce

  1. Configure a gateway (ANTHROPIC_BASE_URL) whose /v1/models returns a multi-model catalog.
  2. Start a fresh session → /model → full catalog listed. ✓
  3. Restart that session with --resume → /model → only slots + the selected model. ✗

Workaround

claude --resume <session> --model <full-model-id> works (the picker footer itself suggests --model for other/previous model names) — so the models are usable, just not listed.

Ask

The --resume path should populate the picker's custom-model list from the fetched /v1/models catalog the same way fresh sessions do.

View original on GitHub ↗