You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Surface a live "recovering…" status to chat clients during durable recovery #1620
When a chat turn is interrupted (deploy/eviction) and Think recovers it, there is
currently no client-facing "in progress" signal while recovery runs. The
client sees the partial transcript with no indication that the turn is being
recovered — it looks idle/stuck until recovery completes (or, now via #1619,
until a terminal error is replayed on connect).
#1619 fixed the terminal half (failed/exhausted turns are surfaced, and
replayed on reconnect — option "A", plus keeping benign skips silent, "C"). This
issue tracks the remaining progress half ("B"): show clients a
"recovering…" indicator so an interrupted-but-recovering turn reads as working
rather than frozen.
Why it's separate
Unlike #1619 (which reused the existing terminal MSG_CHAT_RESPONSE and needed
no client changes), a "recovering" indicator is a new client-facing
capability and spans multiple layers:
Protocol: a new chat message type (e.g. MSG_CHAT_RECOVERING) in agents/chat, broadcast on recovery detect/schedule and cleared on
resolution.
Debounce + reliable clear: recovery is detected many times under churn,
so the signal must be idempotent (only on transition) and cleared on every
terminal path (completed/failed/exhausted/skipped) or a spinner spins forever.
Client rendering:useAgentChat (and downstream SPAs) must render the
new status; needs browser validation.
Acceptance
A connected client shows a "recovering…" state for the duration of durable
chat recovery, and a client that connects mid-recovery learns it on connect.
The indicator clears on every terminal outcome; benign skips do not produce a
stuck indicator.
Backward-compatible: clients that don't understand the new signal ignore it.
Notes
Investigation + the A/B/C/D design options are written up in examples/deploy-churn/INVESTIGATION.md (added in #1618).
Activity
feat(think,ai-chat): live "recovering…" status to chat clients (#1620)…
fix(chat): surface terminal recovery outcome to clients that reconnec…
Recovery: e2e + unit coverage, and fix runFiber recovery starvation/b…
chat-recovery (slice 2e): move incident-update transitions behind the…
Chat recovery foundation: a shared, host-agnostic recovery engine for…