Video summary

Your first agent session in action | Ep 2 of 6 - VS Code Learn

Main summary

Key takeaways

Technology

“Your first agent session in action” — Ep. 2 of 6 (VS Code Learn)

Overview

This episode demonstrates how to run a first agent session in Visual Studio Code with GitHub Copilot, covering approval levels, tool usage, context window management, and practical tips for working with agent actions.

Key concepts and product features

Approval levels (control agent autonomy)

  • Default approvals
    • Copilot uses your configured settings; the agent asks for permission for certain commands.
  • Bypass approvals
    • Auto-approve all tool calls and auto-retry; the agent will still ask clarifying questions if needed.
  • Autopilot (preview)
    • Auto-approve tool calls and let the agent answer clarifications itself — the aim is for the agent to continue until the task is finished.
  • Per-command granularity (via the allow dropdown)
    • Permit:
      • all commands that start with X (session / workspace / always)
      • this exact command (session / workspace / always)
      • allow all commands for the session

Tool calls and tooling

  • Agents use built-in tools to read/write files, run terminal commands, search, web-search, etc.
  • You can view tool-call history and terminal output in the Hidden Terminals area of the terminal pane.
  • Manual tool invocation is supported (for example, prefixing a command with # in chat), but the agent-first model is: tell the agent the task and let it pick tools.
  • Example agent actions demonstrated: reviewed files, edited and created files, wrote tests.

Context window (memory / token usage)

  • Every model has a context window (example in the video: 200,000 tokens). Rough guide used in the video: 1 token ≈ 1 English word.
  • The UI shows percentage usage and a breakdown of what consumes context:
    • System instructions (built-in agent guidelines)
    • Tool definitions (all enabled tools — can be large; enable only needed tools)
    • User context (user messages, agent responses, and tool outputs such as terminal text or file reads)
  • Compact conversation feature
    • Manually invoke to summarize chat history and retain only important details (via UI button or /compact).
    • VS Code and GitHub Copilot also compact intelligently in the background to mitigate context growth.

Practical tips shown

  • View Hidden Terminals to see agent-run commands and outputs.
  • Use the approval dropdown to control the scope of auto-approvals.
  • Monitor the context breakdown to decide when to compact or disable unnecessary tools.

What the video demonstrates / tutorial flow

  1. Continuation from Episode 1 (session already started).
  2. Walkthrough of approving a terminal command, followed by a deeper explanation of approval levels and options.
  3. Review of tool calls the agent performed (edits, tests).
  4. Explanation of context window usage and how to compact the conversation.
  5. Preview of the next video: reviewing agent-made changes and redirecting the agent.

Main speakers / sources

  • Presenter: VS Code Learn series presenter (video host)
  • Product / tech referenced: Visual Studio Code and GitHub Copilot (agent tooling)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video