#1123·humanlayer

[Bug]: Context window badge shows 168k instead of 1M for claude-opus-5-5

Author: lnmxgCreated Sep 24, 2026Updated Sep 24, 2026

Current Behavior / Issue

For sessions running on Opus 5.5 (claude-opus-5-5), the context window badge shows a limit of about 168k tokens. Opus 5.5 has a 1M context window, so the badge should show about 968k, as it does for claude-opus-5.

Expected Behavior

The badge should show the 1M window (968k effective) for claude-opus-5-5, the same as for claude-opus-5, claude-opus-4-8 and the other 1M models.

Steps to Reproduce

  1. Start a session with model claude-opus-5-5
  2. Look at the context window badge
  3. The limit shows about 168k, not about 968k

Context

Environment:

  • Component (e.g., humanlayer-ts, hld, hlyr, humanlayer-wui): HumanLayer App
  • Version: 0.177.0
  • OS: macOS 26.6.2 (25G83)
  • Node/Go version (if applicable): N/A

Nightly build version: N/A

Claude code version: 2.1.281

Related Issues/PRs:

Similar area: #1006, #1023

Additional Information

Likely cause, from reading the bundled riptided (from packages/schemas/src/effect/model-context.ts): resolveEffectiveContextWindow checks for 1M models with exact string matches:

javascript
if (model && (model.includes("[1m]") || model === "opus" || model === "sonnet" ||
    model === "claude-opus-5" || model === "claude-opus-4-8" || model === "claude-opus-4-7" ||
    model === "claude-sonnet-5" || model.endsWith("-1m") || model.includes("fable")))
  return 968000;
...
return 168000;

claude-opus-5-5 doesn't match === "claude-opus-5". It is also missing from the baked model catalog (the string claude-opus-5-5 doesn't appear anywhere in the binary), so the catalog fallback doesn't help either. It ends up at the 168k default.

Possible fix: match by prefix (e.g. model.startsWith("claude-opus-5")) and/or add claude-opus-5-5 to the model catalog. normalizeClaudeModel already uses includes("opus-5"), so the effort levels are right. Only the context window check uses the exact match.

Workaround: selecting the opus alias should show the right limit.