Skip to content

[$250] Agent Zero status indicator gets stuck until page refresh #83776

@MelvinBot

Description

@MelvinBot

Spun off from Expensify/Expensify#599556 per marcaaron's request.

Problem

In a Concierge chat, the user-facing "Concierge is thinking..." / "Concierge is waiting for you to finish..." status indicator can get stuck and not clear until the user refreshes the page.

The useAgentZeroStatusIndicator() hook sets an optimistic "Concierge is waiting for you to finish..." label when the user sends a message. If the Pusher updates carrying the intermediate/clearing labels are dropped, the optimistic label stays stuck until a refresh.

The server-side clearing mechanisms are confirmed to be working correctly (the indicator clears after a page refresh, confirming DB state is correct). The issue is on the client side — the real-time Onyx push update is being missed.

Expected Behavior

The typing/status indicator should reliably clear without requiring a page refresh.

Debugging Info

Investigation Notes (from Expensify/Expensify#599556)

Server-side clearing (confirmed working — 3 layers of redundancy):

  1. Auth C++ finalizeResponse() calls emitConciergeStatus(reportID, "", true)UpdateConciergeStatus PHP API
  2. PHP main flow clearUserFacingIndicator()Auth::setReportNameValuePair() → generates Onyx update
  3. PHP finally block safety net → same Auth::setReportNameValuePair() path

Client-side (suspected problem area):

  • The agentZeroProcessingRequestIndicator rNVP IS included in the reliable Onyx updates system (clients can catch up on missed updates via GetOnyxUpdates)
  • The useAgentZeroStatusIndicator() hook sets an optimistic label when the user sends a message — if Pusher updates are dropped, this optimistic label gets stuck
  • There is no polling/reconciliation mechanism for this specific indicator
  • A possible fix: add a client-side timeout to clear the indicator if no update is received within a reasonable window

Potential Solutions

  • Investigate why the Onyx update clearing the indicator is being missed by the client
  • Consider adding a timeout-based fallback in useAgentZeroStatusIndicator to clear the stuck indicator after a reasonable duration
  • Investigate if there is a Pusher reliability issue or an Onyx re-sync gap for this specific rNVP
Issue OwnerCurrent Issue Owner: @QichenZhu
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022027538040479794626
  • Upwork Job ID: 2027538040479794626
  • Last Price Increase: 2026-02-28

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions