Cloud session shows stale failed/error icon when workspace diff poll returns degraded response; only clears on app restart
- Dominant language
- No language data
- Stars
- 2.1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
## Short summary
A cloud (sandbox) session shows a "failed"/error status icon in the sidebar even though the session is healthy and the agent responds normally. The icon is stale: it never updates while the session stays open, and only clears after fully quitting and relaunching the app.
## Affected version or release
Observed on **v0.2.34** (session created on this build). The stale icon only cleared after restarting the app, which also updated it to **v1.0.0**. OS: Windows.
## Installation context
Personal use against a single connected repository. Cloud sandbox session (execution location = cloud), base branch `main`.
## What happened?
I created a cloud session and used it successfully — the agent responded and the chat worked the whole time. Despite that, the session's sidebar icon showed a failed/error state.
Digging into the app logs (`~/.copilot/logs/github-app..log`), the agent-side RPCs all succeeded, but the **cloud workspace diff poller** repeatedly returned a degraded/fallback response, and it only polled at session-creation time — it never re-evaluated afterward, so the status froze.
Relevant log lines for the affected workspace (`workspace_id=4f778668-...`, `session_id=59a87b13-...`):
```
17:38:24 cloud workspace diff: scheduled poll returned degraded response mode=Branch is_fallback=true truncated_paths=[]
17:38:26 cloud workspace diff: scheduled poll returned degraded response mode=Branch is_fallback=true truncated_paths=[]
17:42:23 cloud workspace diff: RPC returned snapshot elapsed_ms=1 files=0 insertions=0 deletions=0 base_branch=main
17:42:23 cloud workspace diff: scheduled poll returned degraded response mode=Branch is_fallback=true truncated_paths=[]
17:42:25 cloud workspace diff: RPC returned snapshot elapsed_ms=1 files=0 insertions=0 deletions=0 base_branch=main
17:42:25 cloud workspace diff: scheduled poll returned degraded response mode=Branch is_fallback=true truncated_paths=[]
```
Key observations:
1. The underlying `session.workspaces.diff` RPC **succeeds** (returns a snapshot, `files=0`), but the poll is still marked `is_fallback=true` / "degraded response." So a degraded/fallback diff result appears to be surfaced to the user as a hard session "failed" icon.
2. The diff poll only ran during session creation (two bursts at 17:38 and 17:42) and **never re-polled** while the session stayed open. There was no later `is_fallback=false` (healthy) poll to overwrite the state, so the icon stayed stuck.
3. Sending more messages and clicking away/back to the session did **not** clear the icon. Only a full app quit + relaunch reset it.
## Steps to reproduce
1. Create a cloud (sandbox) session.
2. Have the cloud workspace diff poll return a degraded/fallback response at creation (observed with `files=0`, base branch `main`).
3. Use the session normally — the agent responds fine.
4. Observe the sidebar shows a failed/error icon for the session.
5. Send more messages / switch sessions and back — icon does not clear.
6. Quit and relaunch the app — icon finally resets.
## Expected behavior
- A degraded/fallback result from the cloud workspace **diff** poll should not surface as a whole-session "failed" status, since the agent/session is still healthy and usable. Use a softer/neutral indicator (or none) for a degraded diff sync.
- The session status should re-evaluate periodically (or on user interaction) and recover on its own when a subsequent poll succeeds, rather than freezing until an app restart.
- A user-facing way to dismiss/refresh a stale session status icon without restarting the app would also help.
## Additional context
- Logs: `~/.copilot/logs/github-app..log` (lines from `github_app::session::cloud_workspace_diff`). Full request/session IDs available on request.
- Possibly related: #1083 (stale closed-PR red icon persists after state change), #915 (session idle but UI reports activity), #771 (rate-limited session shown as "done"). This report differs in that the trigger is specifically a cloud workspace **diff** poll returning `is_fallback=true`/degraded, and the icon only clears on app restart.
Contributor guide
Assessment
This issue has not been assessed yet.