Skip to content

Model fallback notice leaks to external user-facing channels #92473

Open

Description

@guscamara

Version: 2026.6.5 (5181e4f)

Summary: When a model fallback occurs during an agent run, the runtime emits an internal notice string like "Model Fallback: -> ". The notice is marked for source suppression, but it can still reach external user-facing channels, exposing internal model-routing details to end recipients.

Expected: Fallback notices should be internal-only telemetry, such as verbose logs and lifecycle events. User-facing external messaging channels should not receive raw routing or fallback banners.

Observed: A fallback banner was delivered to an external messaging recipient during an operator deployment. Payload-level suppression was insufficient for the external channel delivery path.

Local workaround tested: stopped appending fallback/fallback-cleared notices to user-facing reply payloads while keeping verbose logs and lifecycle events. A post-restart smoke confirmed the banner no longer appears on the user-facing path.

Suggested fix: gate fallback notice delivery by surface/channel, or add an explicit config flag such as notifications.modelFallback.userFacing=false by default for external channels.

Activity

  1. clawsweeper commented on Jun 12, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep open: customer-facing direct chats still receive fallback notices by design, and a maintainer explicitly retained this issue for the unresolved audience policy.

    Reproducibility: Current source establishes direct-chat delivery, inspected tests explicitly expect it with verbosity off, and auriga-agents supplies a recent WhatsApp report; this review ran no live reproduction.

    Root-cause cluster
    Relationship: canonical
    Canonical: #92473
    Summary: This issue owns the remaining generic fallback-notice audience decision; shared-room suppression is implemented and the broader operational policy remains separate.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Maintainer decision needed

    • Question: Should operators be able to suppress generic fallback and recovery notices in customer-facing direct chats?
    • Recommendation: Approve scoped suppression: Define a narrow operator-controlled audience contract for generic fallback notices, preserving existing observability and treating redirection as separate work.
    • Why: Current source, documentation, and tests deliberately retain direct-chat delivery, while the maintainer discussion leaves this audience policy open and recent operator evidence demonstrates its cost.

    Next step
    A maintainer must approve the suppression scope for customer-facing direct chats before changing the documented fallback-notice policy.

    Security
    None.

    Review details

    Best possible solution:

    Provide maintainer-approved audience control at the existing reply payload owner while preserving fallback execution, lifecycle events, and status visibility.

    Do we have a high-confidence way to reproduce the issue?

    Current source establishes direct-chat delivery, inspected tests explicitly expect it with verbosity off, and auriga-agents supplies a recent WhatsApp report; this review ran no live reproduction.

    Is this the best way to solve the issue?

    Scoped suppression addresses the demonstrated audience problem with less complexity than the proposed multi-mode redirection policy, but requires approval because direct-chat delivery is intentional and documented.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The desired direct-chat audience policy remains undecided; globally removing notices would change documented behavior.
    • Redirecting notices adds destination-authorization and delivery-failure decisions beyond scoped suppression.

    Codex review notes: model internal, reasoning medium; reviewed against bfdc102106bb.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P2: Unwanted operational messages reach customer-facing direct chats, but successful agent replies continue and no urgent availability failure is established.
    • impact:ux-friction: Outside recipients receive confusing provider-routing banners that operators currently address through runtime patches or delivery hooks.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 27, 2026, 5:06 AM ET / 09:06 UTC.

  2. added
    P2Normal backlog priority with limited blast radius.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 12, 2026
  3. added
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 21, 2026
  4. htuyer121 commented on Jul 20, 2026

    @htuyer121
    Contributor

    Adding a related data point from 2026.7.1 on WhatsApp that broadens this beyond the ↪️ Model Fallback notice: the failed-run error copy takes the same user-facing path.

    Setup: customer-facing WhatsApp agent, primary openai/gpt-5.6-terra, fallback xai/grok-4.5.

    What happened: two transient capacity rejections ("Selected model is at capacity") on the primary. The fallback chain worked (candidate_failed → next=xai/grok-4.5 → candidate_succeeded) and the end customer received normal replies from the fallback within seconds. But the failed attempt's error copy was still dispatched to the channel ~1 minute later — the end customer received:

    ⚠️ Selected model is at capacity. Try a different model, or wait and retry.

    sandwiched between otherwise normal agent replies.

    Where: dist/payloads-*.js — when the last assistant message has stopReason === "error", errorText (from formatUserFacingAssistantErrorText, e.g. MODEL_CAPACITY_ERROR_USER_MESSAGE) is pushed as a reply item ({ text: errorText, isError: true }) unless that same turn already delivered via the message tool. A subsequent successful retry/fallback of the same inbound message does not cancel the queued error payload.

    Two extra observations that may help scope the fix:

    1. These kernel-generated error sends are not recorded in the session .jsonl history — only the transport send log shows them — which makes incidents hard to audit after the fact.
    2. A retry-aware fix (drop/coalesce the failed attempt's notice once a retry succeeds) would remove the worst case; the per-surface/per-agent gating proposed here (userFacing=false for external channels) would cover the rest. Same family as [Bug]: Feishu direct repeatedly leaks internal '... (agent) failed' and generic failure banners to users, including false failures after successful runs #89247 ("false failures after successful runs") and the closed Feature: Suppress or customize raw error messages sent to channels (WhatsApp, Telegram) #54825/Raw LLM API errors leak to end users via WhatsApp/messaging channels #20250.

    Current local workaround: dist patch gating the isError reply-item push on the customer-facing agent's session-key prefix.

  5. removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    on Aug 1, 2026
  6. 32 remaining items

  7. removed
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    clawsweeper:intake:needs-reproPreliminary submission classification; full source review pending.
    on Oct 16, 2026
  8. auriga-agents commented on Oct 22, 2026

    @auriga-agents

    Still reproducible on main at ed3010de (2026-10-22) and in the npm releases 2026.10.5 and 2026.10.10-beta.3. Adding an operator data point for the pending audience decision, and a config shape that may also settle the redirect-target question in #113501.

    Current behavior

    • agent-runner-result-payloads.ts L429–L434 delivers the notice to every source chat whose type is neither group nor channel. No config, channel or account setting changes that.
    • The payload is marked for source-suppression delivery (L488–L494), so source-reply suppression doesn't stop it either.

    Our case

    • One agent serves a WhatsApp direct chat with an outside contact, not the operator. When the primary's subscription usage window ran out, a fallback answered and the contact got ↪️ Model Fallback: … as a separate message. Two days later the contact got ↪️ Model Fallback cleared: ….
    • The contact asked us to stop sending these. The operator does want them, but in the operator's own Telegram DM.
    • Only one notice goes out per state change, so this was 2 messages in 4 days. Every one of them reached the wrong audience.

    Why a plugin is no workaround

    • The only seam today is a reply_payload_sending or message_sending hook that cancels the notice payload and re-sends it elsewhere.
    • Registering either hook turns off Telegram drafts for every chat. bot-message-dispatch.ts L225–L233 sets allowProviderPreview to false while either hook exists. With streaming.mode: "progress", that removes the tool-progress status draft (bot-message-dispatch-progress.ts L77) from all Telegram chats of all agents, just to move one notice out of one WhatsApp chat.

    Proposal

    Reuse the target contract of approval forwarding (approvals.exec / approvals.plugin), where operators already list authorized destinations:

    {
      messages: {
        operationalReplies: {
          modelFallback: {
            mode: "session", // "session" (today, default) | "targets" | "both" | "off"
            agentFilter: ["main"],
            sessionFilter: ["whatsapp"], // substring or regex, as in approvals.exec
            targets: [{ channel: "telegram", accountId: "main", to: "123456789" }],
          },
        },
      },
    }
    • session: the current behavior, so no migration.
    • targets: suppress the notice in matching source chats and deliver it to the targets, naming the source session.
    • both: deliver to the source chat and to the targets.
    • off: no visible notice. The lifecycle events (phase: "fallback" / "fallback_cleared"), logs and /status stay as they are.

    Because the targets are static operator config, as in approval forwarding, this needs no new cross-session authorization contract. That is the open security question in #113501. The key name follows #113501, so modelFallback could become one entry of its broader policy.

  9. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    clawsweeper:intake:needs-reproPreliminary submission classification; full source review pending.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    clawsweeper:intake:needs-reproPreliminary submission classification; full source review pending.
    on Oct 27, 2026
  10. openclaw-barnacle commented on Oct 30, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale after 7 days without qualifying human activity.
    Without new human activity, Barnacle may close it as not planned 7 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
    A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.

  11. auriga-agents commented on Oct 31, 2026

    @auriga-agents

    Update while #185934 waits for a maintainer decision:

    • Still reproducible on main at 5eda4667 (2026-10-30) and at the release tags v2026.10.9 and v2026.10.10-beta.5. agent-runner-result-payloads.ts L429–L430 still delivers the notice to every chat that is neither group nor channel.
    • feat: let operators disable model fallback notices #185934 adds an operator opt-out, messages.modelFallbackNotices: false, along the lines of the scoped suppression that the ClawSweeper review above recommends. In the outside-contact case from our earlier comment, it would stop both notices in that chat. The operator's own chats would lose them as well; the PR keeps /status, logs and lifecycle events. Delivering the notice to an operator chat instead would stay with [Feature]: add operational reply policy #113501.
  12. openclaw-barnacle commented on Nov 7, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale after 7 days without qualifying human activity.
    Without new human activity, Barnacle may close it as not planned 7 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
    A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions