feat(auto-reply): add model fallback lifecycle visibility in status, verbose logs, and WebUI#20704
Merged
joshavant merged 6 commits intoopenclaw:mainfrom Feb 19, 2026
Conversation
a890e5f to
e4251b0
Compare
39f13ed to
0b2d6ad
Compare
Member
|
had to run out yesterday and didn’t comment here; i made the toast not rely on verbose for the web UI since its non intrusive and useful info. Just the agent messages would be gated by verbose flag. Also tried simplifying the status message to be less repetitive/cleaner. See what you think |
… logs, status, and web ui Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>
62ba0b0 to
241d39d
Compare
vignesh07
pushed a commit
to pahdo/openclaw
that referenced
this pull request
Feb 20, 2026
…verbose logs, and WebUI (openclaw#20704)
anisoptera
pushed a commit
to anisoptera/openclaw
that referenced
this pull request
Feb 20, 2026
…verbose logs, and WebUI (openclaw#20704)
rodrigogs
pushed a commit
to rodrigogs/openclaw
that referenced
this pull request
Feb 20, 2026
…verbose logs, and WebUI (openclaw#20704)
Hansen1018
added a commit
to Hansen1018/openclaw
that referenced
this pull request
Feb 21, 2026
…verbose logs, and WebUI (openclaw#20704)
Hansen1018
added a commit
to Hansen1018/openclaw
that referenced
this pull request
Feb 21, 2026
…verbose logs, and WebUI (openclaw#20704)
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
…verbose logs, and WebUI (#20704)
vincentkoc
pushed a commit
that referenced
this pull request
Feb 21, 2026
…verbose logs, and WebUI (#20704)
mmyyfirstb
pushed a commit
to mmyyfirstb/openclaw
that referenced
this pull request
Feb 21, 2026
…verbose logs, and WebUI (openclaw#20704)
obviyus
pushed a commit
to guirguispierre/openclaw
that referenced
this pull request
Feb 22, 2026
…verbose logs, and WebUI (openclaw#20704)
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…verbose logs, and WebUI (openclaw#20704)
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
Describe the problem and fix in 2–5 bullets:
cleared.
active model context.
UX consistency.
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
The chat channel validation loop was:
Set agent's primary model to a cooldown state
Send a new message to the agent, triggering a model fallback
Observe: Verbose-mode message, /status shows new 'Active:' line
Send another message to the agent
Observe: No second verbose-mode message, /status still shows 'Active:' line
Remove agent's primary model cooldown state
Send a new message to the agent, triggering a model fallback (to primary)
Observe: Verbose-mode 'clear' message, /status no longer shows 'Active:' line
Send another message to the agent
Observe: No second verbose-mode message, /status still no longer shows 'Active:' line
The WebUI validation loop was the same, except looking for the 'compaction toast'-type UI.
Compatibility / Migration
Failure Recovery (if this breaks)
when fallback is not active.
Risks and Mitigations
Screenshots
Greptile Summary
Added model fallback lifecycle visibility across CLI, WebUI, and verbose logs. When the runtime switches from a selected model to a fallback model (e.g., due to rate limits or provider cooldowns), users now see one-time transition notices and consistent status indicators.
fallback-state.tswith transition detection logic that tracks selected vs active model pairs and emits one-time notices for fallback activation and clearing transitionsSessionEntrywithfallbackNoticeSelectedModel,fallbackNoticeActiveModel, andfallbackNoticeReasonfields to persist transition state across runsrunReplyAgentto emit lifecycle agent events (phase: "fallback"andphase: "fallback_cleared") with verbose notices prepended to reply payloads/statuscommand to display both selected model and active runtime model when fallback is active, including reason summaryConfidence Score: 5/5
fallback-state.ts, runtime integration inagent-runner.ts, status display instatus.ts, and UI rendering in WebUI components. The PR includes comprehensive test coverage (110 lines infallback-state.test.ts, 390+ lines added toagent-runner.runreplyagent.test.ts, 137 lines inserver-chat.agent-events.test.ts, and 86 lines inapp-tool-stream.node.test.ts) that validates transition logic, one-time emission guarantees, and session-scoped event handling. The changes are purely additive for observability and do not modify fallback routing decision logic itself, minimizing risk to existing behavior. Type safety is maintained throughout, and the implementation follows existing patterns (agent events, session state persistence, WebUI toast indicators).Last reviewed commit: 0e1e23e
(5/5) You can turn off certain types of comments like style here!