VS Code Learn | Agent sessions and where agents run

The video explains how to manage multiple agent sessions in VS Code, highlighting options to create, switch, archive, or delete sessions, and demonstrates running agents locally, via GitHub Copilot CLI, or in the cloud on GitHub’s platform. It also introduces different agent modes—plan, ask, and agent—and showcases asynchronous cloud session execution, while previewing a future episode focused on the technical details of agent interactions with large language models.

In this video, the focus is on managing multiple agent sessions within VS Code, building on previous lessons where prompts were edited and sessions forked. The session view allows users to switch between sessions easily by clicking on their names, with options to archive, rename, or delete sessions via right-click. Archiving preserves the session history, while deleting removes it entirely. Users can also create new sessions using the plus sign or the new session button, providing flexibility in organizing their work.

The video highlights different environments where sessions can run. Sessions can be executed locally on the user’s machine, through the GitHub Copilot CLI which runs a background agent locally, or on the GitHub platform itself where the compute happens in the cloud. This variety offers developers choice based on their preferred workflow, whether they favor a terminal-based interface or the VS Code UI. The presenter demonstrates creating a new session and running tasks locally, such as committing changes and generating a .gitignore file.

Different operational modes for agents are introduced: plan mode, ask mode, and agent mode. Plan mode helps outline a strategy for the work, ask mode functions like a traditional chatbot for back-and-forth interaction, and agent mode enables the agent to perform actual work. Beginners are encouraged to start with ask and plan modes before moving to agent mode for implementation. This structured approach helps users gradually build confidence in working with agents.

The video also shows how cloud sessions work by initiating a task to write a README file, which runs on GitHub’s platform. The progress of this cloud-based session can be monitored both within VS Code and directly on GitHub.com, where users can view the agent’s activity, model usage, and tool calls. This asynchronous execution allows users to continue working on other sessions locally or in the cloud without interruption, enhancing productivity.

Finally, the presenter mentions additional options such as leveraging third-party agents and the Copilot CLI for more advanced workflows. The video concludes by previewing the next episode, which will delve deeper into understanding the underlying calls and actions performed by agents, including detailed insights into interactions with large language models (LLMs). This sets the stage for users to gain a more technical understanding of agent operations.