Skip to content

sessions: Refresh chat status after background completion - #333804

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/agents/regression-investigation-pr332931
Sep 1, 2026
Merged

sessions: Refresh chat status after background completion#333804
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/agents/regression-investigation-pr332931

Conversation

@sandy081

@sandy081 Sandeep Somavarapu (sandy081) commented Sep 1, 2026

Copy link
Copy Markdown
Member

Fixes #333785

What changed

  • Reacquire the owning Agent Host session state when a chat turn completes.
  • Refresh main and hidden peer chat statuses after the idle state subscription expires.
  • Add regression coverage for a subagent completing after the session has been backgrounded.

Why

Parent session rows now present the main chat status. Multi-chat sessions, including sessions with hidden subagent chats, keep that status in the chat catalog. When a background session's state subscription expired, ChatTurnComplete refreshed only aggregate session metadata, leaving the main-chat override stuck at In Progress until the session was reopened.

Validation

  • npm run compile
  • npm run hygiene
  • Focused LocalAgentHostSessionsProvider tests
  • ESLint on the changed files
  • git diff --check

Reacquire the owning session state when a chat turn completes so main and hidden chat statuses do not remain stale after the idle subscription expires.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 1, 2026 16:13
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.137.0 milestone Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: None

What changed in this PR

Refreshes Agent Host chat status when background work completes after state-subscription expiry.

Changes:

  • Reacquires the owning session-state subscription on chat completion.
  • Adds regression coverage for background subagent completion.
File Description
baseAgentHostSessionsProvider.ts Refreshes owning session chat state on turn completion.
localAgentHostSessionsProvider.test.ts Verifies stale main and subagent statuses are updated.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sandy081 Sandeep Somavarapu (sandy081) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Sep 1, 2026
@vs-code-engineering

Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.136 when merged.

@sandy081 Sandeep Somavarapu (sandy081) removed the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Sep 1, 2026
@sandy081
Sandeep Somavarapu (sandy081) merged commit ac25654 into main Sep 1, 2026
38 of 41 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/regression-investigation-pr332931 branch September 1, 2026 16:40
Bhavya U (bhavyaus) pushed a commit that referenced this pull request Sep 1, 2026
Reacquire the owning session state when a chat turn completes so main and hidden chat statuses do not remain stale after the idle subscription expires.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents window sessions show in-progress despite being already done

3 participants