AI / GitHub Copilot CLI Fundamentals Interview Questions
What is the --delegate flag and how does the /delegate slash command work?
The /delegate slash command and --delegate flag allow you to hand off a task to Copilot for fully autonomous execution - similar to Autopilot mode but often used to initiate a delegation from the command line or during a session when you want to step away entirely.
# Delegate a task from the command line copilot --delegate "Implement pagination for the /api/users endpoint, add tests, and open a pull request when done" # Inside an interactive session: /delegate # → Copilot switches to full autonomous execution # → You can monitor from GitHub.com or GitHub Mobile # → Use --remote to enable remote monitoring alongside delegation # Combine delegation with remote control: copilot --delegate "Refactor the payment module" --remote # → Task runs autonomously AND you can monitor/steer it remotely
Delegate vs Autopilot: Autopilot mode (via Shift+Tab) keeps you in the session and cycles step approvals automatically. Delegation goes one step further - you explicitly hand the task over and can walk away, with Copilot working until the task is complete. Remote control (--remote) complements delegation by letting you check in from anywhere.
Best uses for delegation: long-running tasks (implementing a feature, writing comprehensive tests, refactoring a module) where you want to continue other work or step away from the computer while Copilot makes progress.
More Related questions...