Skip to content

Initial framework of Claude sessions in the Agents app#311532

Merged
TylerLeonhardt merged 2 commits intomainfrom
tyler/slimy-scallop
Apr 21, 2026
Merged

Initial framework of Claude sessions in the Agents app#311532
TylerLeonhardt merged 2 commits intomainfrom
tyler/slimy-scallop

Conversation

@TylerLeonhardt
Copy link
Copy Markdown
Member

@TylerLeonhardt TylerLeonhardt commented Apr 20, 2026

This is barely functional, but it is possible to chat with Claude through it.

I don't love the direction with this PR... I don't like that Claude is contributed as part of CopilotChatSessionsProvider but the problem is, CopilotChatSessionsProvider is what contributes the browseActions in order to target a local folder.

In other words, basically all session types need to go through this class. I think the API design should change to separate Claude out of Copilot CLI stuff... but in an effort to start playing with it, and pressure to get it out, this was the best option forward.

Features enabled:

  • selecting the permission mode in the new chat, see bugs for what isn't working here
  • sending messages to Claude in the chosen workspace
  • model selection

Features not yet enabled:

  • Worktree/branch pickers
  • Sub-sessions or whatever they're called
  • probably a lot more

Bugs:

First sent message from the welcome chat behavior is VERY strange. The chat is shown completely blank. Then I see the chat under "Unknown" section in the sessions list. I click it, it disappears after a second and reappears in the "Unknown" section. I click it again, it re-appears in the correct place... then I can start chatting with it.

Secondly, no dropdowns show in the existing chat so you can't change the permission mode once you start.

I put all of this behind a setting since it's not really ready yet.. but I wanted to get more eyes on these bugs.

Co-authored-by: Copilot copilot@github.com

Copilot AI review requested due to automatic review settings April 20, 2026 23:02
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) April 20, 2026 23:02
@TylerLeonhardt TylerLeonhardt self-assigned this Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

Screenshot Changes

Base: 7efcd948 Current: 826accea

Changed (26)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after
agentSessionsViewer/CompletedRead/Dark
Before After
before after
agentSessionsViewer/CompletedUnread/Dark
Before After
before after
agentSessionsViewer/FailedWithDuration/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/WithDiffChanges/Dark
Before After
before after
agentSessionsViewer/WithFileChangesList/Dark
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/CloudProvider/Dark
Before After
before after
agentSessionsViewer/BackgroundProvider/Dark
Before After
before after
agentSessionsViewer/CompletedRead/Light
Before After
before after
agentSessionsViewer/CompletedUnread/Light
Before After
before after
agentSessionsViewer/FailedWithDuration/Light
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithDiffChanges/Light
Before After
before after
agentSessionsViewer/WithFileChangesList/Light
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/CloudProvider/Light
Before After
before after
agentSessionsViewer/BackgroundProvider/Light
Before After
before after
agentSessionsViewer/ClaudeProvider/Light
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces an initial, setting-gated integration of Claude Code sessions into the Agents app’s default sessions provider (default-copilot), including UI wiring for a Claude-specific permission-mode picker and metadata needed for correct session grouping.

Changes:

  • Add a new ClaudeCodeSessionType (claude-code) and gate Claude session availability behind sessions.chatSessions.claude.enabled.
  • Extend CopilotChatSessionsProvider to expose/handle Claude sessions (listing, creation, rename routing) and add a Claude permission-mode picker for the new-session controls.
  • Ensure Claude extension session items provide metadata.workingDirectoryPath (when available) so sessions group under the correct workspace instead of “Unknown”; add/extend tests accordingly.
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Adds claude-code session type definition and icon/label metadata.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts Adds Claude enablement setting, Claude new-session implementation, session type exposure, session filtering, and rename support.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsActions.ts Registers a Claude permission-mode picker action for the new-session control toolbar.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessions.contribution.ts Registers the Claude enablement setting in configuration.
src/vs/sessions/contrib/copilotChatSessions/browser/claudePermissionModePicker.ts Adds a new-session permission-mode picker UI for Claude (writes session options pre-send).
src/vs/sessions/contrib/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts Extends provider tests for Claude gating, session types, filtering, and rename behavior.
src/vs/sessions/contrib/copilotChatSessions/test/browser/claudePermissionModePicker.test.ts Adds unit tests for the Claude permission-mode picker UI behavior.
src/vs/sessions/contrib/copilotChatSessions/COPILOT_CHAT_SESSIONS_PROVIDER.md Updates provider documentation to include Claude session type and picker contribution model.
src/vs/sessions/SESSIONS_PROVIDER.md Documents how workspace grouping works and the metadata keys needed for correct grouping.
extensions/copilot/src/extension/chatSessions/vscode-node/claudeChatSessionContentProvider.ts Sets item.metadata.workingDirectoryPath from Claude session cwd for grouping/working directory behavior.
extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeChatSessionContentProvider.spec.ts Adds tests covering metadata emission when cwd is present/absent.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 1

roblourens
roblourens previously approved these changes Apr 20, 2026
TylerLeonhardt and others added 2 commits April 20, 2026 17:03
This is barely functional, but it _is_ possible to chat with Claude through it.

Bugs:

First sent message from the welcome chat behavior is VERY strange. The chat is shown completely blank. Then I see the chat under "Unknown" section in the sessions list. I click it, it disappears after a second and reappears in the "Unknown" section. I click it again, it re-appears in the correct place... then I can start chatting with it.

Secondly, no dropdowns show in the existing chat so you can't change the permission mode once you start.

I put all of this behind a setting since it's not really ready yet.. but I wanted to get more eyes on these bugs.

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@TylerLeonhardt TylerLeonhardt merged commit 8f796b4 into main Apr 21, 2026
26 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/slimy-scallop branch April 21, 2026 01:10
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 21, 2026
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.

4 participants