sessions

A guide for developing the Agents Window, the VS Code area where users work with agent sessions and chat. It defines which parts of the code may depend on one another and how session state should be modeled.

In plain words
What is it for?
Use it when implementing, reviewing, or designing changes under VS Code’s sessions code, including agent state, chat behavior, menus, and related tests.
Why use it?
It prevents code layers from depending in the wrong direction and keeps session state, menus, provider support, and tests organized consistently.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/vscode/sessions
Any agent
npx skills add microsoft/vscode --skill sessions
Clone the repo
git clone --depth 1 https://github.com/microsoft/vscode

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01273
Opus 5 $0.00010 $0.00636
Sonnet 5 $0.00004 $0.00255
Haiku 4.5 $0.00002 $0.00127

Measured yesterday against content hash e14fb404a519, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/sessions/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agents Window development

Use this skill for implementation, review, or design work under src/vs/sessions/**.

1. Apply the core principles

  • Preserve the layer direction: vs/sessions may import vs/workbench and lower layers; vs/workbench must never import vs/sessions.
  • Keep shared Sessions code provider-neutral. Non-provider contributions must not import provider implementations.
  • Model mutable session and chat state with observables. Use events for notifications, not as a parallel state model or for control flow.
  • Register Sessions menu IDs in browser/menus.ts and consume Menus.*.
  • Import contributions from the appropriate sessions.*.main.ts entry point.
  • Prefer Sessions-owned adaptations over shared workbench changes unless the capability is genuinely shared.
  • Put stable architecture in the owning specification and concrete behavior in tests. Do not preserve implementation chronology as development guidance.

2. Identify the owning area

Start with src/vs/sessions/README.md, then read only the specifications relevant to the change:

Area Specification
Layering, folder ownership, cross-module imports src/vs/sessions/LAYERS.md
Session/chat model, services, provider contract, core data flow src/vs/sessions/SESSIONS.md
Workbench parts, grid, title bar, editor presentation src/vs/sessions/LAYOUT.md
Session-aware layout state and restoration src/vs/sessions/LAYOUT_CONTROLLER.md
Single-pane behavior and expected compositions src/vs/sessions/SINGLE_PANE_SCENARIOS.md
Sessions sidebar list, grouping, filtering, and persistence src/vs/sessions/SESSIONS_LIST.md
Phone layout and mobile components src/vs/sessions/MOBILE.md
AI customizations src/vs/sessions/AI_CUSTOMIZATIONS.md
Copilot customizations src/vs/sessions/copilot-customizations-spec.md
Copilot Chat provider src/vs/sessions/contrib/providers/copilotChatSessions/COPILOT_CHAT_SESSIONS_PROVIDER.md
Agent Host provider src/vs/sessions/contrib/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md
Remote Agent Host provider src/vs/sessions/contrib/providers/remoteAgentHost/REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 93 lines · 20 tokens per session scan A e14fb404a519

Subscribe to this mod's changes

sessions is a skill published in the GitHub repository microsoft/vscode (190,061 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,273 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

docx

使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill—— 包括他们说"写一份报告"、"起草建议书"、"制作合同"、 "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。 即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。.

Playa-0v0/Cyrene-Agent · 169 tokens

cyrene-plan-mode

当 Cyrene 处于 Plan Mode(计划模式),正在讨论、调查、细化或准备代码/文件改动的实施计划时使用。.

Playa-0v0/Cyrene-Agent · 37 tokens

as-planning-and-task-breakdown

Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.

Playa-0v0/Cyrene-Agent · 58 tokens

as-spec-driven-development

Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea.

Playa-0v0/Cyrene-Agent · 44 tokens

ecc-code-tour

Create CodeTour .tour files — persona-targeted, step-by-step walkthroughs with real file and line anchors. Use for onboarding tours, architecture walkthroughs, PR tours, RCA tours, and structured "explain how this works" requests.

Playa-0v0/Cyrene-Agent · 54 tokens

ecc-codebase-onboarding

Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.

Playa-0v0/Cyrene-Agent · 54 tokens