gut(session): remove vestigial model fallback system#2130
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 8, 2026
Merged
Conversation
CLI runtimes manage their own model selection — RemoteClaw has no model fallback. Remove the dead transition system: resolveFallbackTransition, fallback notices, fallbackNotice* session fields, RuntimeFallbackAttempt, fallbackProvider/fallbackModel tracking, and UI fallback indicators. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 24, 2026
alexey-pelykh
added a commit
that referenced
this pull request
Apr 24, 2026
#2549) The backend fallback-state stub returns `{}`/`undefined`, so the guarded emit branches in `agent-runner.ts` never fire. The UI handler stack, toast indicator, state field, and CSS rules are dead wiring — remnants of the incomplete #2130 cleanup (#2529 F2). Removals (UI-side only; backend cleanup deferred per issue scope): - `app-tool-stream.ts`: `FallbackStatus` type, `FallbackAttempt` type, parse helpers, `handleLifecycleFallbackEvent`, `lifecycle`/`fallback` dispatcher branch, `FALLBACK_TOAST_DURATION_MS`, fallback fields on `CompactionHost`, and now-dead locals (`toTrimmedString`, `resolveModelLabel`, `resolveAcceptedSession`) - `app-tool-stream.node.test.ts`: deleted (100% fallback tests) - `app-view-state.ts`: removed `fallbackStatus` field + import - `views/chat.ts`: removed `FallbackIndicatorStatus`, `ChatProps.fallbackStatus`, `renderFallbackIndicator`, toast constant, call-site - `views/chat.test.ts`: removed 3 obsolete `renderFallbackIndicator` tests and default `fallbackStatus: null` prop - `app.smoke.test.ts`: updated `COMPACTION_HOST` doc comment to reflect remaining two optional fields - `styles/components.css`: removed `.compaction-indicator--fallback` and `--fallback-cleared` rules Net: 461 deletions, 3 insertions across 7 files. Verification: - `pnpm check` (format, tsgo, oxlint, css-class-drift): green - `pnpm test:ui:smoke`: 12/12 pass - AC grep (`fallbackStatus|FallbackStatus|FallbackIndicatorStatus|handleLifecycleFallbackEvent|renderFallbackIndicator|parseFallbackAttempt` across `ui/src`): 0 matches Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 24, 2026
#2549) (#2554) The backend fallback-state stub returns `{}`/`undefined`, so the guarded emit branches in `agent-runner.ts` never fire. The UI handler stack, toast indicator, state field, and CSS rules are dead wiring — remnants of the incomplete #2130 cleanup (#2529 F2). Removals (UI-side only; backend cleanup deferred per issue scope): - `app-tool-stream.ts`: `FallbackStatus` type, `FallbackAttempt` type, parse helpers, `handleLifecycleFallbackEvent`, `lifecycle`/`fallback` dispatcher branch, `FALLBACK_TOAST_DURATION_MS`, fallback fields on `CompactionHost`, and now-dead locals (`toTrimmedString`, `resolveModelLabel`, `resolveAcceptedSession`) - `app-tool-stream.node.test.ts`: deleted (100% fallback tests) - `app-view-state.ts`: removed `fallbackStatus` field + import - `views/chat.ts`: removed `FallbackIndicatorStatus`, `ChatProps.fallbackStatus`, `renderFallbackIndicator`, toast constant, call-site - `views/chat.test.ts`: removed 3 obsolete `renderFallbackIndicator` tests and default `fallbackStatus: null` prop - `app.smoke.test.ts`: updated `COMPACTION_HOST` doc comment to reflect remaining two optional fields - `styles/components.css`: removed `.compaction-indicator--fallback` and `--fallback-cleared` rules Net: 461 deletions, 3 insertions across 7 files. Verification: - `pnpm check` (format, tsgo, oxlint, css-class-drift): green - `pnpm test:ui:smoke`: 12/12 pass - AC grep (`fallbackStatus|FallbackStatus|FallbackIndicatorStatus|handleLifecycleFallbackEvent|renderFallbackIndicator|parseFallbackAttempt` across `ui/src`): 0 matches Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/auto-reply/fallback-state.tsentirely (198 lines)fallbackNoticeSelectedModel,fallbackNoticeActiveModel,fallbackNoticeReasonfromSessionEntryRuntimeFallbackAttempttype andfallbackProvider/fallbackModel/fallbackAttemptsfrom agent run loopresolveFallbackTransitioncalls, fallback notice building, and fallback event emission fromagent-runner.tssessions-patch.tsandsession-status-tool.tsFallbackStatus,handleLifecycleFallbackEvent,renderFallbackIndicator) from web UICloses #2106
Test plan
pnpm checkpasses (format + typecheck + lint)pnpm testpasses (883 passed, 83 skipped — no regressions)🤖 Generated with Claude Code