Skip to content

Agent Sessions sidebar: per-session status freezes for Copilot CLI sessions (both directions); mark-as-read and rename inert #327639

Open

Agent suggestions

Public preview

Description

  • Copilot Chat Extension Version: 0.58.0 (bundled copilot-chat)
  • VS Code Version: 1.130.0 (1b6a188)
  • OS Version: macOS 26.5.2 (25F84)
  • Feature: Agent Sessions view (Copilot CLI sessions provider)
  • Selected model: Claude Fable 5
  • Logs: excerpts inline below

Summary

In one window, the Agent Sessions sidebar's per-session status froze at a
point in time (~11:25–11:35 local) and never updated again, while the sessions
themselves kept running fine. Both directions of wrongness at once:

  • An idle session kept showing the in-progress indicator (blue dots), with
    its subtitle stuck on a tool step ("Read cspell-probe.log") that had
    completed ~40 minutes earlier. "Mark as read" had no effect — the stale
    in-progress state kept re-asserting the unread dot.
  • Rename was dead too: attempting to rename some of the stuck entries had
    no effect (pre-restart) — the frozen items' action surface, not just their
    status/read-state, was affected.
  • A session that was genuinely mid-turn (blocked on a pending tool
    permission approval) showed no progress indicator at all — its entry was
    frozen at "idle, 48 mins ago", from before its current turn started. The
    permission prompt itself was never seen either (not found in the chat pane;
    possibly never rendered) — the session sat silently wedged.

No cross-attribution: each entry displayed its own session's stale snapshot.
It looks like a single freeze of the per-item status stream, not mixed-up
sessions.

Evidence

CLI-side state on disk was clean and live throughout — the staleness is in
the extension's view of it:

  1. Idle-but-shown-busy session (116212c2…): its events.jsonl shows
    balanced pairs across the whole period — 36/36
    tool.execution_start/complete, every turn closed, and a proper
    session.shutdown at the end of each user turn. The tool step named in the
    stuck subtitle completed at ~11:35 (the freeze onset).
  2. Busy-but-shown-idle session (9ac390d9…): its events.jsonl ends with
    assistant.turn_start → 3× tool.execution_start →
    permission.requested at 11:50, with 9 permission.requested vs 8
    permission.completed — i.e. genuinely in-turn, awaiting approval, started
    ~25 min after the freeze — and never got a progress indicator.
  3. The provider's enumeration kept running: GitHub Copilot Chat.log for
    that window shows listSessions took entries continuously through and
    after the freeze window (no gap, 11:00→12:30, dozens per 10-min bucket),
    and store size here is small (~93 sessions; listSessions is fast). So
    this is not the O(N) enumeration stall of Copilot Chat re-walks the entire CLI session store on every refresh — extension host stalls for minutes with a large store #327021 — the list refreshed;
    the per-item status/read-state is what froze.
  4. No correlated [error] entries in the extension log at freeze onset (only
    unrelated GitServiceImpl noise about an untitled buffer).
  5. Both sessions (and a third, healthy-and-active one) were owned by the same
    extension-host process (single inuse.<pid>.lock holder), same window.

Steps to reproduce

Not deterministic; observed state documented above. Setup that produced it:

  1. One window (workspace ~/git) with several Copilot CLI sessions: one
    actively working, others conversational with pauses between turns.
  2. Use the sessions over ~an hour (turns, tool calls, permission prompts).
  3. Observe the sidebar freeze per-session status at some point: idle sessions
    stuck "in progress" (mark-as-read ineffective), a later-started real turn
    never showing progress.

Expected

  • Sidebar status tracks each session's actual state (in progress / awaiting
    approval / idle).
  • "Mark as read" clears the unread dot for a session that is not running.
  • A session blocked on a permission approval is surfaced as such — "awaiting
    approval" is more actionable than a generic spinner in the chat pane and no
    indicator in the list.

Notes

Activity

  1. chalin commented on Jul 27, 2026

    @chalin
    Author

    A second, better-instrumented occurrence of the silent permission prompt facet (evidence item 2 above), the next day (2026-07-27, same versions), with two new details: host/CLI turn-state divergence, and inter-session message delivery silently lost while wedged.

    Timeline (UTC, from the session's events.jsonl, session a6b8f621…):

    1. 14:11:22 — a message sent from another agent session (via the inter-session send_message tool) is delivered; the CLI runs it normally: 3 turns, one shell permission requested and approved, tools completing.
    2. 14:11:38.000 — two permission.requested (kind: read) fire for two parallel file reads. No prompt ever rendered. The session wedges here.
    3. The Agent Sessions host reported this delivered turn as cancelled — nobody cancelled it; CLI-side it was alive, blocked on the unanswered permission requests.
    4. 14:15:22 — a follow-up nudge is sent from the other session; send_message reports success, but no user.message event ever appears in the wedged session's log (only subagent.deselected + session.permissions_changed). Host-side that turn showed inProgress for 41+ minutes with provably zero activity (no file access, clean git status).
    5. 15:00:54 — manual stop: permission.completed ×2 + abort (user_initiated) land together; the very next message runs normally.

    So one unrendered permission prompt cascaded into three misreports: a live blocked turn shown as cancelled, a never-delivered message shown as in progress, and a lost message reported as sent successfully to the sending session. Artifact forensics was the only way to detect any of it.

    Happy to share this session's events.jsonl privately as well.

  2. chalin commented on Jul 27, 2026

    @chalin
    Author

    Two follow-on observations on the same session (a6b8f621…), same window:

    1. Read-path flakiness: minutes after a get_session_context call on this session returned its recent turns (19–22), the identical call returned an empty transcript ([], hasMoreHistory: false) — a transient empty read of a live session's history. Same misreporting family: the store had the data (it was served moments earlier and again later); the read path intermittently reports "nothing".
    2. Color on the state divergence: after recovery, the wedged session (which cannot perceive its own stall) reported the cancelled/stalled turns as "not stalled — only briefly interrupted", contradicted by the recorded turn states (one cancelled unprocessed, one inProgress 41 min with zero artifacts). Downstream consumers — human or agent — have only the host's turn state to go by, which makes its accuracy the whole game.
  3. eleanorjboyd commented on Jul 30, 2026

    @eleanorjboyd
    Contributor

    I hit another form of this status mismatch in the Agents window on macOS (2026-07-30): the sidebar labeled the selected session “Input needed”, but the open conversation was actively Processing a Read agent operation and contained no prompt, permission request, or other action for me to take.

    In other words, the sidebar exposed an actionable waiting state even though the session was still running and required no user input. The status remained visible across multiple points during the active turn.

    Expected: “Input needed” should appear only when the session has a currently actionable prompt. While the agent is processing, the sidebar should show an in-progress state instead.

  4. eleanorjboyd commented on Jul 30, 2026

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions