-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Session pin to fallback-only model silently removes fallback chain via dedup (fallbackConfigured:false) #77766
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
When a session is pinned to a model that only exists in
agents.defaults.model.fallbacks(not as primary), the fallback chain is silently reduced to length 1 via deduplication. The result isfallbackConfigured:falsein the decision log — the session has no safety net despite a fallback chain being configured globally.Steps to reproduce
agents.defaults.model.primary: venice/claude-sonnet-4-6,fallbacks: [openai/gpt-5.5]openai/gpt-5.5(e.g. via model switch)openai/gpt-5.5Expected: fallback chain is consulted; at minimum the user gets an error from exhausted fallbacks with options
Actual:
fallbackConfigured:false,chain_exhaustedafter 1 attempt, silent failureRoot cause (traced in source)
model-fallback-Bpl6-0ev.jsline 662:When
effectivePrimaryisopenai/gpt-5.5and the configured fallbacks list is[openai/gpt-5.5], thecreateModelCandidateCollectordedup set (seen) eliminates gpt-5.5 as a fallback candidate because it was already added as the primary.candidates.length === 1→hasFallbackCandidates = false.The fallback inclusion logic (lines 530–545) correctly detects that the effective primary differs from the configured primary and checks whether the effective primary exists in the fallback list — but this check serves to include fallbacks, not to expand them. The dedup step then collapses the list back to 1.
User-facing surprise
Pinning reduces resilience, which is the opposite of user expectation. A user who pins to a fallback model for testing assumes the global fallback chain remains operative.
Proposed fix
When a session pin's effective primary matches a model in the configured fallback list, expand the candidate list with the next-tier fallback (e.g. if the pin is
openai/gpt-5.5and the global fallbacks are[openai/gpt-5.5], include the global primaryvenice/claude-sonnet-4-6as a fallback candidate, or at minimum warn that the fallback chain is collapsed).A simpler mitigation: when
candidates.length === 1andisPrimary && effectivePrimary !== configuredPrimary, add the configured primary as a fallback candidate.Evidence from logs
Version
OpenClaw 2026.5.3-1 (2eae30e), macOS 26.4.1 arm64