Skip to content

Agents window: start a new session in a chat window - #346678

Merged
Sandeep Somavarapu (sandy081) merged 16 commits into
mainfrom
agents/chat-window-new-session
Nov 7, 2026
Merged

Sandeep Somavarapu (sandy081) merged 16 commits into
mainfrom
agents/chat-window-new-session

Conversation

@sandy081

@sandy081 Sandeep Somavarapu (sandy081) commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

What

In the Agents window, a chat window (sessions.chatWindows.enabled) can now start a new session in place. New Session in a chat window opens an empty new-session composer as a chat tab next to the window's active chat:

  • Entry points:

    • Agents: New Session (F1);
    • Cmd/Ctrl+N while the chat window has focus (in a text editor of the window it still creates an untitled file);
    • New Session in the window's Sessions picker, with Alt+Enter / Cmd+Enter to open it beside the active chat.

    There is no title bar button. When the active chat is an unsent composer, New Session focuses it.

  • Defaults: the composer starts from the active chat's session: its folder (or No Workspace), agent and provider, model, mode, and Dev Container environment. The new session joins that session's custom group in the sessions list. All of these can be changed before sending.

  • Send: a foreground send turns the tab into the new session's main chat, in the same tab and with focus kept. The chat stays in this window, held out of the main window's grid like the window's other chats. The main window's composer and grid are untouched.

  • Background send (Send in Background, Alt+Enter by default): the session starts in the background and shows in the sessions list, in its group. The composer stays as is, reseeded with the same target, and shows "Message sent" with Open Session. If the background send fails, the prompt goes back into the composer when nothing changed there; otherwise a notification offers Restore Prompt and Copy Prompt.

  • Restore: unsent composers, with their input, come back with their window after a reload.

  • Moves: until its session is sent, a composer can't leave its window. Move to Main Window is disabled while the window holds an unsent composer, and moving or copying the composer to another or a new window is refused, with the reason. Once sent, the chat moves like any other.

  • Closing: while unsent, the composer's tab shows with its close button, also when it is alone in its group; closing it discards the draft.

  • Main window stays in charge of global composer features: a chat window's composer never takes the main window's tours, tryouts, onboarding targets, workspace selection or Voice Mode, so opening one doesn't disconnect a running Voice Mode.

Also included, as a separate commit: Quick input: track modifier keys in windows registered before it. The quick input tracked Alt/Cmd only in the main window and in windows registered after it was created. It is created on first use, so in a window that already existed, such as a chat window restored after a reload, Alt+Enter or Cmd+Enter in a picker acted as plain Enter. It now also tracks the windows registered before it.

Specs updated: src/vs/sessions/SESSIONS.md (draft slots; new sessions in chat windows) and src/vs/sessions/SESSIONS_LIST.md (a draft slot's custom group).

Commits

  1. Sessions: new-session drafts can be held in independent slots
  2. Sessions list: sessions sent from a draft slot join the slot's group
  3. Sessions: a new-session composer can keep its drafts for a host outside the main window
  4. Sessions: a hosted composer keeps its input in its host's snapshot
  5. Sessions: a hosted composer aims for its host's requested target
  6. Quick input: track modifier keys in windows registered before it
  7. Sessions: a chat window can show a new-session composer as a chat
  8. Sessions: chat window composers restore after a reload
  9. Sessions: a chat window composer gets back the prompt of a failed background send
  10. Sessions: a chat window's unsent composer can't leave its window
  11. Sessions: a chat window composer keeps the Dev Container of the session it inherits from
  12. Sessions: New Session in a chat window opens a new session there
  13. Sessions: a chat window's new sessions don't take the main window's composer actions or tours
  14. Sessions: document new sessions in chat windows
  15. Sessions list: a slot's send keeps its group while its session drops out of the list
  16. Sessions: chat window new-session tests and fixtures pass on every platform and test runner

Commits 15 and 16 address review and CI feedback:

  • Group placement during a provider change (review): a session sent from a chat window lost its custom group when it briefly dropped out of the sessions list while its request ran, such as while its provider was replaced. It now keeps the group until the request ends.
  • Cmd/Ctrl+N test on Linux and Windows: the test resolved the running platform's keybindings as macOS. It now checks the keybinding on macOS, Linux and Windows.
  • Browser unit tests: the new-session widget tests for a chat window composer lacked the agent host filter service that the web code reads, and expected the No Workspace option, which the web doesn't offer.
  • Sessions list Playwright fixtures: the fixtures' management service didn't provide the request events the sessions groups service now listens to, so the list didn't render.

How to test

With sessions.chatWindows.enabled on, in the Agents window:

  1. Open a session in a chat window (sessions list > Open in > New Window).
  2. Press Cmd/Ctrl+N in the chat window. A New Session tab opens next to the chat, with its folder, agent, model and mode. Press Cmd/Ctrl+N again: the same composer gets focus.
  3. Type a prompt and send. The tab becomes the new session's chat, with an empty input. The main window doesn't change, and the session shows in the same custom group as the source session.
  4. Open another composer, type, and reload the window. The composer comes back with its text.
  5. With an unsent composer in the window, Move to Main Window is disabled. Running it anyway shows the reason.
  6. Open the window's Sessions picker, choose New Session, and press Alt+Enter: the composer opens beside the active chat with its own tab. Its × discards it.
  7. Alt+Enter (Send in Background) in a composer starts the session in the background. The composer stays, with "Message sent" and Open Session.
  8. Reload with a chat window open, then, before opening any other picker, open its Sessions picker and hold Alt or Cmd while pressing Enter on New Session: the composer opens beside the active chat.

Validation

At the final tip, rebased on current main (counts below were taken before commits 15 and 16; those commits were validated on their own as listed at the end):

  • pnpm run typecheck-client at each of the 14 commits: passed.

  • ./scripts/test.sh --run <test files changed by the commit> at each commit: passed.

  • ./scripts/test.sh --run <file> at the tip, all passing:

    File Passing
    newChatWidget 246
    sessionWorkspacePicker 222
    sharedChatInputComposer 45
    agentHostAgentPicker 49
    chatWindowComposer 13
    sessionsChatWindowProvider 34
    chatEditor 21
    chatWindow 73
    chatWindowsRestoration 19
    newChatDraftState 3
    viewEditor 20
    multiEditorTabsControl 103
    iconLabel 7
    sessionsList 481
    sessionAgentMerge 4
    chatWindowContribution 14
    sessionsActions 88
    sessionsChatAccessibilityHelp 66
    parallelTasksTour 18
    chatService 305
    quickinput 46

    voiceBridge (25) and newChatVoiceTarget (3) also pass.

  • ./scripts/test.sh --runList <affected folders>: 6402 passing, 22 pending, 0 failing.

  • Each new test was checked to fail with its fix reverted: 101 of 102 mutations fail. The one that survives removes the line that passes the voice eligibility into the composer's options in the NewChatWidget constructor; no unit test constructs a full NewChatWidget, so that line is verified by reading the source, while the method it calls is tested.

  • pnpm run eslint <changed files>, pnpm run valid-layers-check, pnpm run check-cyclic-dependencies: passed. git diff --check: clean.

  • Performance, measured locally against main: no regression. Startup and the main window's New Session are within noise, opening a chat window composer creates no extra chat widgets, 20 composer open and close cycles leak nothing, and typing in a composer writes no storage per keystroke.

  • Commits 15 and 16: pnpm run typecheck-client at both; Electron newChatWidget 246, chatWindowContribution 14, sessionGroupsService 75 passing; Chromium (pnpm run test-browser-no-install -- --browser chromium) the same files and all of vs/sessions (7893 passing, 0 failing); the sessionsListTwistie Playwright fixture tests, 34 passing; ESLint and layers check passed.

  • Manually verified in a Code - OSS dev build:

    • the entry points and their keys, including Alt+Enter and Cmd+Enter in the Sessions picker of a chat window restored after a reload, before any other picker was opened;
    • the inherited defaults;
    • sending in place, and that the input stays empty after a delayed send, a reload and Move to Main Window;
    • restore after a reload;
    • the move refusals and Move to Main Window being disabled;
    • the composer's tab-bar menu and its close button, also alone in a group;
    • the background send.

Known issues (not addressed here)

  • Test isolation: chatWindowChangesetActions.test.ts fails when loaded together with agentMergeActions.test.ts in one test run (a pre-existing upstream issue on main).
  • Browser tabs: browser tabs opened from a chat window's composer don't follow its draft's network (follow-up).
  • Picker shortcuts: the new-session pickers' focus shortcuts don't reach a chat window's composer.
  • Cmd+W: in a chat window, Cmd+W from a chat input closes its group rather than the chat. A chat alone in its group merges into the neighboring group. This also happens on main.
  • Dictate focus: after Alt+Enter in a composer, focus moves to its Dictate button. The main window's composer does the same.
  • Draft slot lifetime: a background send that outlives its chat window composer keeps that composer's model in memory until the send ends, through the draft slot's re-adopt check. It never restores into a closed composer.
  • F1: F1 in a chat window lists both "Agents: New Session" and the main window's "Chat: New Session" with the same key.
  • Not tested manually:
    • Voice Mode and dictation with a chat window composer, because starting them asks for microphone permission; unit tests cover that the composer never becomes the Voice Mode target;
    • the Dev Container defaults, which are covered by unit tests.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 22:45
@vs-code-engineering

vs-code-engineering Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

TylerLeonhardt

Matched files:

  • src/vs/platform/quickinput/browser/quickInputController.ts
  • src/vs/platform/quickinput/test/browser/quickinput.test.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/test/browser/sessionNavigation.test.ts
  • src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.ts
  • src/vs/workbench/contrib/sessions/browser/newSessionComposerService.ts
  • src/vs/workbench/contrib/sessions/browser/sessionGroupsService.ts
  • src/vs/workbench/contrib/sessions/browser/sessionsManagementService.ts
  • src/vs/workbench/contrib/sessions/browser/sessionsService.ts
  • src/vs/workbench/contrib/sessions/common/newChatDraftState.ts
  • src/vs/workbench/contrib/sessions/common/sessionsManagement.ts

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.

🟡 Changes recommended

Temporary provider-catalog removal clears group placement for an in-flight slot send, causing a subsequently successful session to lose its source session’s custom group.

1 open issue
What changed in this PR

This PR enables new-session composers inside Agents chat windows, keeping their drafts and sends separate from the main window while reusing shared session and editor infrastructure.

Changes:

  • Adds independent draft slots, inherited session defaults, input snapshots, and custom-group placement.
  • Adds chat-window entry points, composer-to-chat transitions, restoration handling, and unsent-composer move restrictions.
  • Persists cleared external-chat drafts and extends regression tests, specifications, and accessibility help.
File Description
src/​vs/​workbench/​services/​editor/​test/​browser/​viewEditor.test.ts Tests dynamic view-title rendering.
src/​vs/​workbench/​contrib/​sessions/​test/​common/​newChatDraftState.test.ts Tests send-attempt snapshot ownership.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​sessionGroupsService.test.ts Tests draft-slot group placement.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​sharedChatInputComposer.test.ts Tests snapshot tracking, recovery, and focus.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​agentHostAgentPicker.ts Reports explicit user agent selections.
src/​vs/​workbench/​contrib/​sessions/​common/​sessionsManagement.ts Defines draft slots and request lifecycle contracts.
src/​vs/​workbench/​contrib/​sessions/​common/​newChatDraftState.ts Adds hosted input snapshots and serialization helpers.
src/​vs/​workbench/​contrib/​sessions/​browser/​sessionsService.ts Keeps independent drafts outside grid navigation.
src/​vs/​workbench/​contrib/​sessions/​browser/​sessionGroupsService.ts Tracks group intent for independent slots.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​chatView.ts Defines hosted-composer targets and recovery hooks.
src/​vs/​workbench/​contrib/​sessions/​browser/​newSessionComposerService.ts Adds user agent-selection notifications.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sharedChatInputComposer.ts Tracks hosted input and send attempts.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionWorkspacePicker.ts Supports independent workspace selection state.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionModelSelection.ts Reports explicit user model selections.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newSessionAction.ts Extracts inherited session-target resolution.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newChatComposerInput.ts Adds snapshot and send-attempt options.
src/​vs/​workbench/​contrib/​chatWindow/​test/​browser/​chatWindowsRestoration.test.ts Tests partial and failed window restoration.
src/​vs/​workbench/​contrib/​chatWindow/​test/​browser/​chatWindow.test.ts Tests new-chat delegation, adoption, and move vetoes.
src/​vs/​workbench/​contrib/​chatWindow/​browser/​chatWindowsRestoration.ts Retains unopened chats for later restoration.
src/​vs/​workbench/​contrib/​chatWindow/​browser/​chatWindowService.ts Tracks opened chats and delegates new-chat creation.
src/​vs/​workbench/​contrib/​chatWindow/​browser/​chatWindow.ts Extends provider and window lifecycle interfaces.
src/​vs/​workbench/​contrib/​chat/​test/​common/​chatService/​chatService.test.ts Tests cleared external drafts across reloads.
src/​vs/​workbench/​contrib/​chat/​common/​chatService/​chatServiceImpl.ts Persists metadata when stored drafts are cleared.
src/​vs/​workbench/​browser/​parts/​editor/​viewEditorPane.ts Honors dynamic title-rendering state.
src/​vs/​workbench/​browser/​parts/​editor/​viewEditorInput.ts Adds title-rendering control without changing capabilities.
src/​vs/​sessions/​SESSIONS.md Documents draft slots and chat-window composers.
src/​vs/​sessions/​SESSIONS_LIST.md Documents draft-owner custom-group intent.
src/​vs/​sessions/​services/​sessions/​test/​browser/​sessionNavigation.test.ts Updates management-service test doubles.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListTools.test.ts Adds request lifecycle event stubs.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListChatMoveDnd.test.ts Updates drag-and-drop service mocks.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Updates list service mocks.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsArchiveActions.test.ts Updates archive-action service mocks.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsActions.test.ts Tests window-aware New Session routing.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsActions.ts Routes picker creation and hides inapplicable close actions.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostAgentPicker.test.ts Tests user versus automatic agent selection.
src/​vs/​sessions/​contrib/​onboardingTours/​test/​browser/​parallelTasksTour.test.ts Tests chat-window tour suppression.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​parallelTasksTourContribution.ts Limits tour eligibility to the main window.
src/​vs/​sessions/​contrib/​chatWindow/​test/​browser/​chatWindowContribution.test.ts Tests command availability and keyboard routing.
src/​vs/​sessions/​contrib/​chatWindow/​common/​chatWindows.ts Defines unsent-composer context and move explanation.
src/​vs/​sessions/​contrib/​chatWindow/​browser/​openChatInWindow.ts Disables main-window moves with unsent composers.
src/​vs/​sessions/​contrib/​chatWindow/​browser/​chatWindowActions.ts Adds the chat-window New Session command.
src/​vs/​sessions/​contrib/​chatEditor/​test/​browser/​chatEditor.test.ts Tests composer transitions, focus, and move restrictions.
src/​vs/​sessions/​contrib/​chatEditor/​browser/​chatEditorContent.ts Hosts composers and transitions to session chats.
src/​vs/​sessions/​contrib/​chatEditor/​browser/​chatEditor.ts Connects composer content and editor move restrictions.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionWorkspacePicker.test.ts Tests hosted workspace-selection isolation.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsChatAccessibilityHelp.test.ts Tests feature-gated composer guidance.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Explains chat-window creation, sending, and recovery.

Review effort: Balanced

@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/chat-window-new-session branch 2 times, most recently from d73ab08 to c747a67 Compare November 6, 2026 23:38
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Base: fde6187a Current: a99e28c6

No screenshot changes.

A composer outside the main window needs a draft of its own that sending,
replacing or discarding never takes from the main composer, and that it can
get back when its send fails.

- ISessionsManagementService.createNewSessionSlot creates an independent
  slot; defaultNewSessionSlot is the slot of newSession, with the existing
  createNewSession, createQuickChat and discardNewSession.
- getNewSessionOwner names the slot that owns a draft or an accepted
  request, following the session's replacements, also while
  onDidDiscardNewSession fires for it.
- onDidAcceptNewSessionRequest fires when sendNewChatRequest accepts a
  slot's draft, before the slot lets go of it: in the background at
  dispatch, in the foreground after preparation, with the prepared session.
  onDidEndNewSessionRequest fires once per accepted request with the final
  session, whether it started, failed or was cancelled.
- A send clears only its owner slot's draft; the main composer still drops
  its draft for any send, as before.
- A failed foreground send of a live slot that holds no other draft becomes
  its draft again when the slot's readoptOnFailure accepts it; otherwise an
  independent slot's uncreated session is deleted. A session its provider
  removed is neither re-adopted nor deleted. Failures of an independent
  slot's background sends are reported on the end event, not as a
  notification. The main composer keeps its behavior.
- ISessionsService.openNewSession({ draftSlot }) creates the draft in that
  slot behind the same trust and Dev Container checks, without changing the
  grid or navigation.
- The grid's send-follow neither starts nor ends for sends of independent
  slots. A disposed slot creates no drafts.

Co-authored-by: Copilot <[email protected]>
- ISessionGroupsService.setDraftSlotGroup records the group every send of a
  new-session draft slot joins, until it is disposed or the group is
  deleted.
- A send of an independent slot takes that group when the request is
  accepted, keeps it while the session is not listed, follows its
  replacements, joins the group when the session starts and drops it when
  the request ends without starting, so a retried send joins it once.
- The main composer's pending group is captured and reset only for sessions
  no independent slot owns, so a send or discard of another composer never
  consumes or clears it.

Co-authored-by: Copilot <[email protected]>
…de the main window

IChatViewOptions.newSessionDraft hosts a composer outside the main window's
grid, such as in a chat window. Its drafts are held in the host's draft
slot: creating, replacing, reseeding and discarding them never changes the
main composer's draft, the grid or navigation. The Inbox's detached composer
keeps the main composer's slot.

- Accepted feedback belongs to the main composer: a hosted composer neither
  sends nor clears it. Compare Agents is not offered; a stale comparison
  send is refused with its reason.
- Alt+Enter shows the composer's "Message sent" status, and its Open
  Session opens the session through the host, in the host's window.
- Before a background send, the composer hands it to the host
  (trackBackgroundSend), which follows the request until it ends, also
  after the composer is gone: the management service does not notify
  failures of an independent slot. trackNewSessionRequestEnd follows a
  request through its replacements. The composer keeps only its own status
  listener, and the host reads whether the send is still the composer's
  latest through a weak reference, which its status cleanup does not end.

Co-authored-by: Copilot <[email protected]>
A composer outside the main window keeps its input in an
IComposerInputSnapshot of its host instead of the main composer's saved
draft, so each composer restores its own input.

- The composer restores the snapshot once the context queued before
  rendering is merged, and only then writes it, synchronously, on every
  change of its text, attachments, inline references or attachment pills.
  It never writes it when it is disposed, nor from a widget it no longer
  shows, and never writes the main composer's saved draft.
- Each send is bracketed with an attempt that holds the input from before
  the composer cleared it, so a reload during the send restores what was
  sent. A send that does not go out gives its input back to the snapshot
  when its view is gone, unless the next view has input of its own. An
  attempt is ended only by the completion of its own send
  (ComposerInputSnapshot).

Co-authored-by: Copilot <[email protected]>

# Conflicts:
#	src/vs/workbench/contrib/sessions/browser/chat/newChatComposerInput.ts
#	src/vs/workbench/contrib/sessions/browser/chat/newChatWidget.ts
#	src/vs/workbench/contrib/sessions/test/browser/chat/sharedChatInputComposer.test.ts
A host can request what its composer creates drafts for: a folder or none,
and the agent, model and mode, such as another chat's defaults.

- The composer starts from the requested target rather than from the main
  composer's last workspace, which it does not persist over. The agent is
  the pick the composer aims for when it becomes available only later.
- The requested model applies when the agent offers it, otherwise the
  agent's default model; the mode applies to the requested agent.
- The user's workspace, agent, model and mode picks replace the requested
  target, and an Alt+Enter send's selection becomes the target of the next
  draft.

Co-authored-by: Copilot <[email protected]>
The quick input tracks which modifier keys are pressed, for example so that
Alt+Enter accepts a pick to the side, with listeners on every window: the
main window and each window registered after it was created. It is created
as it is first used, so a window registered earlier, such as an auxiliary
window opened before the first quick input, never had its modifier keys
tracked, and accepting there always saw none.

It now also tracks the windows registered before it.

Co-authored-by: Copilot <[email protected]>
A chat window can open a new-session composer as a tab in the group of its
active chat. The composer starts from the active chat: its session's folder
(or No Workspace for a quick chat), agent, model and custom agent, and the
sessions it sends join the custom group of that session in the sessions list.

- The composer keeps its drafts in a draft slot of its own and never touches
  the main window's composer or grid.
- A foreground send keeps the composer's tab: once the request starts the
  session, the tab becomes the session's main chat, which the window then
  holds out of the grid like its other chats. A failed send gets its draft
  back while the composer still aims for what it sent.
- A background (Alt+Enter) send leaves the composer with a new draft; a
  failure is reported also after the composer is gone.
- Opening a composer while the active chat is an unsent composer focuses it.
- While it is a composer, its tab shows, with its close button, also alone in
  its group, as it has no title of its own until its session's chat shows.
- Its session's chat takes over the chat model the composer was bound to, as
  in the main window, instead of loading the chat again. It holds that model
  only until the chat's view has bound to it, so that the view can still let
  go of it, such as to load it again once its provider is replaced.
- The new-session target the main window's New Session action inherits is
  shared with the chat window.

Co-authored-by: Copilot <[email protected]>

# Conflicts:
#	src/vs/sessions/contrib/chatEditor/browser/chatEditor.ts
#	src/vs/sessions/contrib/chatEditor/browser/chatEditorContent.ts
#	src/vs/sessions/contrib/chatEditor/test/browser/chatEditor.test.ts
#	src/vs/sessions/contrib/chatWindow/browser/sessionsChatWindowProvider.ts
#	src/vs/sessions/contrib/chatWindow/test/browser/sessionsChatWindowProvider.test.ts
#	src/vs/workbench/contrib/sessions/browser/chat/newSessionAction.ts
The composers of chat windows are stored when the window's state is saved,
never as their input changes. Each entry holds what the composer aims for,
its custom group, its input with attachments and references, and a send
that has not ended.

- A stored composer restores in its window as a composer with its input.
  If a send had not ended, it restores with what was sent, or as the main
  chat of the session that send started.
- Once the chat windows have restored, the stored composers they did not
  restore are forgotten. A chat window that failed to open stays stored, and
  its composers count as restored, so they are tried again next time.
- Malformed entries are dropped on their own.

Co-authored-by: Copilot <[email protected]>
…kground send

When a composer's background (Alt+Enter) send fails to start its session,
the prompt goes back into the composer, with its attachments and
references, as long as nothing changed there: the send was the composer's
latest, its input is still empty and idle, and the user hasn't changed
what it aims for since. The restore is announced.

Otherwise the notification names the workspace and agent the prompt was
sent to and offers Restore Prompt, which leaves what the composer aims for
unchanged, and Copy Prompt. Once the composer is gone, only Copy Prompt is
offered.

Co-authored-by: Copilot <[email protected]>
A new-session composer that hasn't sent its session stays in its chat
window until it's sent:

- Its editor refuses moves to another window or to a new window, with
  the reason "A new session can't leave its window until it's sent. Send
  it, or close it to discard it." Moves within its window are allowed, and
  a copy of it is a move.
- Move to Main Window is disabled while the window holds an unsent
  composer, active or not. Run anyway, the chat window service asks the
  provider first and shows the reason, leaving the window and its chats as
  they are. Closing the window is not affected.

Once the composer's send starts its session, it moves like any chat.

Co-authored-by: Copilot <[email protected]>
…on it inherits from

A new-session composer opened from a session that runs in a Dev Container
now aims for that container too, as the main window's New Session does:
its drafts of that folder are created in a Dev Container, or not at all.

- The requested target carries whether the folder's drafts require a Dev
  Container. It's inherited from the active chat's session, stored and
  restored with the composer, kept for the next draft after a background
  send, and applied again when the composer is shown again.
- The user's folder or environment pick decides it from then on: a pick in
  another environment no longer requires the container. After a declined
  trust prompt, the composer goes back to what its kept draft runs in.

Co-authored-by: Copilot <[email protected]>
New Session in a chat window (the Command Palette, and Cmd/Ctrl+N while the window's chat, a new session there or its title bar has focus) opens a new-session composer as a tab of the window's active chat. The Sessions picker of a chat window opens it there too, beside the active chat when opened to the side and without focus in the background. The key does not apply in the window's other editors, nor in the search picker of an empty file editor, nor with AI features disabled or chat windows turned off; the main window's New Session is unchanged. The window's title bar has no New Session button.

A chat window opens a new chat through its provider (IChatWindowService.openNewChat), which for the Agents window is a new-session composer. The accessibility help documents New Session in chat windows.

Co-authored-by: Copilot <[email protected]>
…omposer actions or tours

A new-session composer of a host of its own, such as a chat window's, keeps its drafts tracked but never becomes the active composer of the composer service, nor the target of Voice Mode as it mounts or gains focus: the global composer actions (tours, the folder and picker tryouts, onboarding targets, the workspace handoff), the workspace selection and Voice Mode keep applying to the main window's composer, so opening one does not disconnect a running Voice Mode. The Parallel Tasks tour, which points at the main window's sessions list, triggers only for a session focused in the main window, not for one in a chat window.

Co-authored-by: Copilot <[email protected]>
Describe draft slots and their request lifecycle, the chat window's
new-session composer as a session host, and how a slot keeps its
sessions-list custom group.

Co-authored-by: Copilot <[email protected]>
roblourens
roblourens previously approved these changes Nov 7, 2026
…out of the list

A send from a chat window's draft slot takes the slot's custom group when it is
accepted and keeps it until its request ends. A session dropping out of the
sessions list while the request runs, such as while its provider is replaced,
cleared that group and the send's slot marker, so the started session ended up
outside its source session's group. A session that drops out of the list now
keeps a slot send's group; the request's end still drops it when the session
does not start.

Co-authored-by: Copilot <[email protected]>
…atform and test runner

- The Cmd/Ctrl+N keybinding test resolves the default keybindings of macOS,
  Linux and Windows instead of assuming the macOS chord: Cmd+N on macOS,
  Ctrl+N elsewhere.
- The new-session widget tests of a composer with a draft host give their
  harness the agent host filter, which the web reads when it checks which
  agents create drafts, and expect no No Workspace option on the web, which
  does not offer one.
- The sessions list fixtures' management service provides the request events
  the sessions groups service now listens to, so the fixtures render again.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants