Sessions

From microsoft/vscode · View interactive version

Sessions is an AI agent skill from the GitHub repository microsoft/vscode. Core principles and workflow router for changes to the Agents Window under src/vs/sessions.

How to use this skill

Skill file

Agents Window development

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

1. Apply the core principles

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 |

| Automations ownership, routing, migration, persistence, and run lifecycle | src/vs/sessions/AUTOMATIONS.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 |

| Desktop layout scenarios and expected compositions | src/vs/sessions/DESKTOP.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/workbench/contrib/sessions/providers/copilotChatSessions/COPILOT_CHAT_SESSIONS_PROVIDER.md |

| Agent Host provider | src/vs/workbench/contrib/sessions/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md |

| Remote Agent Host provider | src/vs/workbench/contrib/sessions/providers/remoteAgentHost/REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md |

Do not load the learning inbox by default. Search its headings and scopes, then read only matching entries after the authoritative specification.

3. Inspect before changing

4. Implement the contract

Apply the core principles and the focused specification. Prefer small changes that preserve these boundaries:

Specification edit gate

Bug fixes do not update specifications when they restore an existing contract. Before editing an authoritative specification, identify all three:

  1. the existing ownership, interface, lifecycle, state-machine, persistence, or cross-component contract that intentionally changes;
  2. the implementation surfaces affected by that contract change;
  3. why a regression test and a brief code comment cannot fully represent it.

If any answer is missing, leave the specification unchanged. Put concrete behavior in a focused test, keep a non-obvious implementation constraint beside the owning code, and preserve investigation history in the issue or pull request.

Update a specification only when component ownership, an interface or lifecycle contract, a state machine, persistence, or a cross-component invariant changes. Do not update specifications for styling, copy, action placement, telemetry fields, settings defaults, implementation algorithms, or individual bug fixes. Those details belong in code and focused tests.

5. Validate proportionally

Run the smallest existing checks that cover the change:

Documentation-only changes require link, path, and consistency checks rather than a full build.

6. Record feedback correctly

When a user explicitly corrects or rejects an approach, invoke the feedback-learning skill unless they use the literal learn! trigger. Literal learn! requests follow .github/instructions/learnings.instructions.md instead. A durable architecture invariant belongs in the owning specification, concrete behavior belongs in a regression test, and unproven reusable guidance belongs temporarily in the scoped learning inbox. Never append every correction to this skill.

7. Maintain this skill

Update this skill only when a principle is stable, cross-cutting, and useful for most Agents Window work, or when the routing/workflow itself changes. Put subsystem contracts in their focused specification and bug behavior in tests.

Keep the core-principles section at no more than ten bullets. Before adding one, merge overlap, remove obsolete guidance, and prefer rewriting an existing principle. Never append incident-specific details or use this skill as a learning log.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.