Skip to content

agentHost: unify session and chat creation tools - #332758

Merged
Sandeep Somavarapu (sandy081) merged 5 commits into
mainfrom
sandy081/agents/session-vs-chat-tools-summary
Aug 26, 2026
Merged

Sandeep Somavarapu (sandy081) merged 5 commits into
mainfrom
sandy081/agents/session-vs-chat-tools-summary

Conversation

@sandy081

Copy link
Copy Markdown
Member

Summary

  • replace the separately advertised create_session and create_chat tools with one create_session contract using relationship: currentSession | independent
  • require and persist a title before starting the initial prompt, with relationship-specific progress labels and provider/model validation
  • retain create_chat as an unadvertised compatibility route for restored calls until October 26, 2026
  • preserve materialized session-tool definitions without freezing dynamically enabled tool groups

Testing

  • npm run compile
  • npm run hygiene
  • focused Agent Host unit tests (62 passing)
  • Copilot prompt snapshot strict replay (22 passing)
  • unified create_session strict-replay E2E scenarios (3 passing)

Advertise one create_session contract that distinguishes current-session and independent work, requires titles, and preserves legacy create_chat routing temporarily. Persist created chat titles and keep provider prompts, labels, and tests aligned.

Co-authored-by: Copilot <[email protected]>
Keep per-session session-tool schemas stable without freezing dynamic tool groups, and validate required titles before creating chats or sessions.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings August 26, 2026 14:57
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.136.0 milestone Aug 26, 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.

Pull request overview

Unifies Agent Host session and chat creation under the create_session tool while retaining legacy create_chat compatibility.

Changes:

  • Adds relationship-aware creation, title persistence, and provider/model validation.
  • Preserves materialized tool definitions and legacy routing.
  • Updates UI progress handling, tests, snapshots, and replay fixtures.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts Tests peer-chat progress chips.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts Detects chat-scoped creation links.
src/vs/platform/agentHost/test/node/sessionServerTools.test.ts Expands unified-tool and compatibility tests.
src/vs/platform/agentHost/test/node/serverToolGroups.test.ts Tests relationship-specific display labels.
src/vs/platform/agentHost/test/node/e2e/suites/serverToolsSuite.ts Migrates creation E2E scenarios.
.../Agent_Host_E2E___Copilot_prompts_gpt-5.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5-mini.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5-codex.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_6-terra.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_6-sol.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_6-luna.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_1.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_1-codex.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gpt-5_1-codex-mini.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_gemini-2_0-flash.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-sonnet-5.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-sonnet-4_6.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-sonnet-4_5.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-opus-5.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-opus-4_8.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-opus-4_7.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-opus-4_6.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-opus-4_5.prompt.md Updates prompt schema snapshot.
.../Agent_Host_E2E___Copilot_prompts_claude-haiku-4_5.prompt.md Updates prompt schema snapshot.
src/vs/platform/agentHost/test/node/e2e/KNOWN_ISSUES.md Renames the Claude known issue.
.../copilotcli-server-tool-create-session-materializes-a-selected-model-child-session-and-starts-its-prompt.yaml Updates independent-session replay.
.../copilotcli-server-tool-create-session-currentsession-starts-a-prompt-in-a-peer-chat.yaml Adds current-session replay.
.../copilotcli-server-tool-create-session-currentsession-applies-an-explicit-peer-title.yaml Updates peer-title replay.
.../copilotcli-server-tool-create-chat-defaults-to-the-invoking-session-and-starts-its-local-prompt.yaml Removes obsolete replay.
src/vs/platform/agentHost/test/node/agentService.test.ts Migrates service-level creation tests.
src/vs/platform/agentHost/node/shared/sessionServerTools.ts Implements the unified contract and legacy route.
src/vs/platform/agentHost/node/shared/agentServerToolHost.ts Adds per-session definition materialization.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Uses session-specific tool definitions.
src/vs/platform/agentHost/node/agentService.ts Updates orchestration documentation.
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts Updates telemetry documentation.
src/vs/platform/agentHost/AGENTS.md Documents unified creation semantics.

Review details

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

  • Files reviewed: 36/36 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Scope current-session model lookup to its provider, reject ambiguous independent model names, and validate legacy chat titles before creating persistent work.

Co-authored-by: Copilot <[email protected]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 9991b7f into main Aug 26, 2026
54 of 55 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/session-vs-chat-tools-summary branch August 26, 2026 17:51
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants