6 min read
Lesson 5 of 6
Copilot Workspace & Agent Mode
From the course GitHub Copilot Mastery
Copilot Workspace and Agent Mode represent the future of AI-assisted development — autonomous coding agents that can handle complex, multi-file tasks.
Copilot Workspace
Copilot Workspace is a cloud-based development environment that tackles entire tasks:
- Start from an issue — Link a GitHub issue or describe a task
- AI creates a plan — Copilot analyzes your repo and proposes which files to create/modify
- Review the plan — Edit the plan before Copilot starts coding
- AI implements — Copilot writes the code across multiple files
- Review and iterate — Check the changes, ask for modifications
- Create a PR — Push the changes as a pull request
Agent Mode (VS Code)
Agent Mode in VS Code Copilot Chat can autonomously:
- Edit multiple files in your project
- Run terminal commands
- Read and analyze terminal output
- Install dependencies
- Run tests and fix failures
- Iterate until the task is complete
Example: "@workspace Create a REST API endpoint for user registration with email validation, password hashing, and a corresponding unit test"
Agent Mode will:
- Create the route handler
- Add validation logic
- Implement password hashing
- Write unit tests
- Run the tests
- Fix any failures
Copilot CLI
Use Copilot in the terminal:
# Explain a command
gh copilot explain "find . -name '*.ts' -exec grep -l 'useState' {} \;"
# Suggest a command
gh copilot suggest "find all large files over 100MB in this repo"
Best Practices for Agent Mode
- Start with clear, specific task descriptions
- Review the plan before letting it execute
- Use for well-defined tasks with clear success criteria
- Keep your project well-organized with clear file structure
Key Takeaways
- •Copilot Workspace handles entire tasks from issue to pull request
- •Agent Mode autonomously edits files, runs commands, and iterates on failures
- •Copilot CLI explains and suggests terminal commands
- •Start with clear task descriptions and review plans before execution
0 of 6 lessons marked complete
Progress is kept in this browser only.