Text of code.visualstudio.com › docs › agents › run › agents-window as Styx crawled it on Oct 9, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Use the Agents window

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. 🎬 Watch The Story of VS Code! VS Code is now on Instagram, follow @vscode.ig for updates, tips, and more. Rewatch GitHub Copilot Day. Use the Agents window View as Markdown Ask in VS Code Ask in VS Code Insiders When you delegate tasks across several projects, use the Agents window to track progress and review results in one place instead of switching between project windows.

This dedicated Visual Studio Code window keeps the focus on assigning work and reviewing outcomes. If your task needs frequent editing, debugging, or testing in one project, use the Chat view beside your editor instead. This article shows how to start, monitor, review, and finish sessions in the Agents window. For conversation controls shared by both interfaces, see Use chat in VS Code . Prerequisites Visual Studio Code installed.

Download VS Code . One of the following authentication options: Access to GitHub Copilot. Follow the steps in Set up GitHub Copilot in VS Code to sign in and activate your subscription. A Claude API key or another supported bring-your-own-key (BYOK) configuration for the experimental signed-out experience. An existing ChatGPT sign-in for Codex for the experimental signed-out experience. A BYOK model configured for Agent Host sessions.

Open the Agents window The Agents window opens as a dedicated VS Code window alongside your main editor window. To open the Agents window, use one of the following methods: Select the Open in Agents button in the VS Code title bar Run the Chat: Open Agents window command from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ) Select Try out the new Agents window link from the VS Code welcome page Run code --agents from the command line.

On Windows, right-click the VS Code taskbar icon and select Agents Window from the Tasks jump list. Open https://insiders.vscode.dev/agents in a browser to use the Agents window from any device. See remote agent sessions for setup instructions. By default, the Agents window requires GitHub authentication to access your Copilot subscription and sessions. If you're already signed in to GitHub in VS Code, you'll also be signed in when the Agents window opens.

Note You can hide the Open in Agents button by right-clicking it in the title bar and selecting Hide 'Open in Agents' . You can still open the Agents window at any time from the Command Palette or command line. Open without GitHub sign-in (Experimental) On desktop, you can open the Agents window without signing in to GitHub when at least one of these options is available: Claude configured with an API key or another supported Claude BYOK option.

Codex signed in to ChatGPT. A visible BYOK model configured in VS Code. Enable chat.agentHost.byokModels.enabled Open in VS Code Open in VS Code Insiders to make BYOK models available to Agent Host sessions. Enable chat.agentHost.allowSignedOutWhenUsable Open in VS Code Open in VS Code Insiders before you open the window. This setting is off by default, but it might be enabled by an experiment. To use a ChatGPT subscription, enable chat.agentHost.codexAgent.enabled Open in VS Code Open in VS Code Insiders , open the account menu in the Agents window, and select Sign in to ChatGPT .

After you sign in, you can sign out of GitHub and continue to use ChatGPT-backed Codex models. While you're signed out of GitHub, the model picker only shows models from providers with available credentials or keys. Sign in to GitHub from the account menu to add Copilot-backed models. If multiple providers offer a model with the same name, the model picker identifies the provider. When VS Code discovers an existing Claude configuration, a notification indicates that Claude is available without GitHub sign-in.

Dismiss the notification with X to hide it for the current window. Select Don't Show Again to hide it for future windows on the same machine. If VS Code doesn't find a provider that can run with its own credentials, the Agents window shows the existing GitHub sign-in experience. Providers, models, and operations that require GitHub authentication prompt you to sign in when you select them. The browser-based Agents window always requires GitHub sign-in.

Agents window interface overview The Agents window has the following main areas: Sessions list : view and manage sessions across workspaces. By default, sessions are grouped by workspace. Select a session to make it active . Customizations panel : access agent customizations for your workflow and preferences, and open Automations when enabled. Chat area : view and interact with the active agent chat conversation Changes panel : review changes for the active session Files panel : browse the workspace associated with the active session By default, the Changes and Files views appear in a separate side panel.

Files and diffs open in an editor beside the chat or in a modal window. Understand the active session The Agents window picks up your agent sessions across your workspaces. The active session is the session that currently has focus. Its conversation and project context determine what you see and which workspace your actions apply to. Select a session in the sessions list to open it and make it active. When you open multiple sessions side by side , select anywhere in a session view to make that session active.

The active session is highlighted in the sessions list. The following parts of the window update when the active session changes: Area What it shows for the active session Chat The conversation history and prompt input. Files The files in the session's workspace folder or worktree. This view includes all workspace files, not only files changed by the agent. Changes The changes and Git actions for the session. Use the dropdown to choose the branch changes, uncommitted changes, all changes, or changes from the last agent turn.

Terminal and Tasks Commands and tasks that run in the session's workspace folder or worktree. Browser Browser tabs and page state that belong to the session. Quick chats aren't associated with a workspace. When a quick chat is active, the workspace-specific Files and Changes views aren't shown. Start an agent session Start a session for a local folder, GitHub repository, or remote workspace . You can attach other projects, issues, and pull requests as context before you send the first prompt.

For work that doesn't belong to a project, start a quick chat . To start a new agent session in the Agents window: Select New at the top of the sidebar or press ⌘N (Windows, Linux Ctrl+N ) . To start directly in a specific workspace, hover over the workspace in the sessions list and select + (New Session). Select Folder or Repository to choose the primary execution workspace for the session. The first folder or repository you select determines where the agent runs and changes files.

To connect through SSH or a dev tunnel, select Remote Setup . If the workspace isn't trusted, review the Workspace Trust prompt before you continue. Optionally, attach more context to the request: Select Folder or Repository to attach more projects as context without adding workspace roots. Select Add Context , and then select Issue... or Pull Request... . If multiple GitHub repositories are available, select a repository before you choose the issue or pull request.

Paste a GitHub issue or pull request URL directly into the prompt. The URL remains in the prompt, and VS Code automatically adds the item as a context attachment. Choose an available agent harness, and optionally configure the agent, language model, permission level, and isolation mode. For folder isolation in a local Git repository, you can also select an existing local branch to check out before the session starts. The available options depend on the workspace.

Learn how to choose a harness and code isolation . Type a prompt that desc

The rest of this page is on the live site.