Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sahajamit/d23b2254583fdbbd92f755a4d77035f6 to your computer and use it in GitHub Desktop.

Select an option

Save sahajamit/d23b2254583fdbbd92f755a4d77035f6 to your computer and use it in GitHub Desktop.
GitHub Copilot CLI: Agentic & Loop-Engineering Features (vs Claude Code) — researched 2026-06-16

GitHub Copilot CLI: Agentic & Loop-Engineering Features (vs. Claude Code)

Research note compiled 2026-06-16. Purpose: evaluate whether GitHub Copilot CLI can replace Claude Code for 24/7 autonomous / agentic engineering on a second machine. Every claim below was checked against official GitHub docs, the GitHub changelog, or the github/copilot-cli repo. Claims I could not verify are explicitly flagged.

TL;DR verdict

Copilot CLI has genuinely closed most of the gap with Claude Code on agentic workflows, and in one area (cloud delegation) it does something Claude Code's local /loop cannot: it offloads work to GitHub's servers so your laptop can sleep. The mental model is:

  • Local autonomous loop--autopilot (+ --max-autopilot-continues) and --yolo
  • Local scheduling/every and /after (experimental)
  • Cloud / 24-7 offload/delegate and the & prefix (Copilot coding agent)
  • Sub-agents → built-in Explore, Task, General-purpose, Code-review + custom .md agent profiles
  • Extensibility → MCP auto-loaded from .github/mcp.json and ~/.copilot/mcp-config.json

It is a viable daily driver for agentic engineering. The two real caveats: scheduling is in-session only (the session must stay alive, like Claude Code's /loop), and a couple of the features circulating in blog posts are misattributed (details in the fact-check section).


Claude Code → Copilot CLI feature map

Claude Code feature Copilot CLI equivalent Status
/loop <interval> recurring prompt /every <interval> <prompt> ✅ Real (experimental)
/loop self-paced / one-shot delay /after <delay> <prompt> ✅ Real (experimental)
Autonomous goal loop / headless agent --autopilot + --max-autopilot-continues ✅ Real
--dangerously-skip-permissions --yolo (alias of --allow-all) ✅ Real
Headless -p print mode -p non-interactive + -s quiet output ✅ Real
Scheduled cloud agents (routines) /delegate / & → Copilot coding agent ✅ Real (cloud, not cron)
Sub-agents / Task tool Built-in Explore/Task/General-purpose/Code-review + custom agents ✅ Real
MCP servers .github/mcp.json, ~/.copilot/mcp-config.json, --additional-mcp-config ✅ Real
Cron-scheduled background routines ❌ No native cron; closest is /delegate (cloud) or external cron + -p ⚠️ Gap

1. Cloud offload: /delegate and the & prefix

This is Copilot CLI's headline differentiator and it is real.

  • Use the /delegate slash command followed by a prompt, or prefix any prompt with &, to hand the task to the Copilot coding agent (an asynchronous, autonomous cloud agent).
  • Copilot first offers to commit your unstaged changes as a checkpoint on a new branch, then the cloud agent works in the background, opens a draft pull request, and requests your review.
  • You get a link to the PR and the agent session on GitHub, and you can close your laptop — the work continues server-side.
  • Available on all paid plans (Pro, Pro+, Business, Enterprise).

This is closer to Claude Code's scheduled cloud agents / routines than to local /loop: the unit of delivery is a draft PR, not terminal output.

2. Local scheduling: /every and /after

Shipped in the 2026-06-02 changelog ("prompt scheduling"), currently behind /experimental.

  • /every <interval> <prompt> — recurring execution within the session. Examples from the changelog: /every 30m run the frontend tests, /every 1h how many tokens have I used during the past hour.
  • /after <delay> <prompt> — one-shot delayed execution. Example: /after 2h /example-skills:docx create a new file summarizing recent changes to this repo.
  • Run either command with no arguments to open a schedule manager (view active schedules, remove them).
  • You can schedule a skill, not just a plain prompt.

Important limitation: these schedule within the current CLI session. Like Claude Code's /loop, the session has to stay alive. This is not OS-level cron. For true unattended cron, use an external scheduler (launchd/cron) calling copilot -p ..., or use /delegate to push work to the cloud.

3. Autonomous local loops: --autopilot

This is the direct analogue of an agentic goal-loop, and it is real (documented under "Allowing GitHub Copilot CLI to work autonomously").

  • --autopilot lets Copilot CLI work autonomously, carrying out multiple steps until the task is complete.
  • --max-autopilot-continues <N> caps how many times it may continue on its own — a runaway-loop backstop, important in programmatic contexts where nobody is watching.
  • Stop conditions: the agent decides the task is done; a blocking problem occurs; you press Ctrl+C; or the continuation limit is hit.

Example:

copilot --autopilot --max-autopilot-continues 20 "Fix all failing tests"

⚠️ One known sharp edge: there is an open issue (github/copilot-cli #1532) about autopilot looping indefinitely when the internal task_complete tool is unavailable. Always set --max-autopilot-continues in unattended runs.

4. Headless / programmatic mode (for CI and custom wrappers)

Verified against the official programmatic reference. Use these to drive Copilot from shell scripts or CI:

Flag Meaning
-p PROMPT Execute a prompt non-interactively and exit when done
-s Suppress stats/decoration, output only the agent's response (ideal for piping). Note: the flag is -s, there is no documented --silent long form
--allow-all / --yolo Grant all permissions; equals --allow-all-tools --allow-all-paths --allow-all-urls
--allow-tool=TOOL Selectively grant one tool (quoted, comma-separated for several)
--model=MODEL Pin a model, e.g. gpt-5.2 or claude-sonnet-4.6
--secret-env-vars=VAR Redact secrets from output (quoted, comma-separated for several)

A clean autonomous CI invocation looks like:

copilot --autopilot --yolo --max-autopilot-continues 10 -s -p "Fix the failing tests"

(--yolo + -s is the correct spelling; the --silent name some blog posts use is wrong.)

5. Sub-agent orchestration (built-in + custom)

Copilot CLI ships with a default group of built-in agents for common tasks. Per the custom-agents docs these are:

  • Explore — quick codebase analysis; ask questions about your code without polluting your main context (good for large repos).
  • Task — general task execution.
  • General-purpose — catch-all.
  • Code-review — review-oriented.

You add your own via agent profiles (Markdown files) that declare the agent's expertise, allowed tools, and instructions:

  • User-level: ~/.copilot/agents
  • Repo-level: .github/agents (local and remote)
  • Precedence: user > repo > org

Invoke with /agent, by mentioning the agent in a prompt, or with copilot --agent=<name>.

❗ Correction to a common blog claim: there is no built-in Plan sub-agent for "dependency analysis." Copilot CLI does have a Plan mode (a planning workflow), but that is a different concept from the four built-in agents listed above. Don't expect a Plan agent in the agent picker.

6. MCP integration

First-class and auto-loaded. MCP servers are resolved from multiple sources (highest precedence first):

  1. --additional-mcp-config (session override, command-line)
  2. .github/mcp.json (workspace, auto-loaded)
  3. .mcp.json / .vscode/mcp.json (standard workspace configs)
  4. ~/.copilot/mcp-config.json (user-global; override location with COPILOT_HOME)
  5. Built-in servers (the GitHub MCP server ships pre-configured — e.g. merge PRs from the CLI)

Connection types: STDIO, SSE, and Remote OAuth. Manage interactively with /mcp [show|add|edit|delete|disable|enable].

Note: items 1–2 (--additional-mcp-config and auto-load from .github/mcp.json) are documented in the community DeepWiki for the repo but are less prominently covered in the official first-party docs than the ~/.copilot/mcp-config.json path. Treat the global path as the canonical, always-safe option and verify the workspace auto-load on your installed version.

7. Other useful slash commands

/clear, /exit /quit, /session /usage, /add-dir, /list-dirs, /cwd, /model, /theme, /terminal-setup, /reset-allowed-tools, /share [file|gist], /login /logout, /user, /help, /feedback, plus an experimental terminal UI with tabs for issues, PRs, and gists (via /experimental). Rubber duck and voice input are now generally available.


Fact-check of the original Google-research notes

Your pasted summary was mostly right. Corrections and confirmations:

Original claim Verdict
/delegate and & ship work to a cloud agent that opens a draft PR ✅ Correct
/every [interval] recurring, /after [delay] one-shot ✅ Correct (note: experimental, in-session only)
--autopilot + --max-autopilot-continues for headless loops ✅ Correct
--yolo grants full permissions ✅ Correct (alias of --allow-all)
--silent flag suppresses thinking logs ⚠️ Partly wrong — the flag is -s; no documented --silent long form
Built-in Explore agent ✅ Correct
Built-in Plan agent for dependency analysis ❌ Wrong — Plan is a mode, not one of the built-in agents (Explore/Task/General-purpose/Code-review)
"cutting tool failure rates by roughly 20%" ❌ Unverified — no official source for this figure; treat as marketing
Parallel sub-agent execution ⚠️ Plausible but I found no first-party doc stating it explicitly; not confirmed
Auto-loads MCP from .github/mcp.json; --additional-mcp-config flag ✅ Likely correct (community DeepWiki); the canonical documented path is ~/.copilot/mcp-config.json

Bottom line for your second machine

Copilot CLI is ready for serious agentic engineering. For your use case, the workhorses are: --autopilot --yolo --max-autopilot-continues N -p "..." for unattended local loops, /delegate (or &) when you want work to continue after you close the lid, and /every / /after for in-session scheduling. The one thing it does not give you natively is OS-level cron-scheduled background runs — for that, wrap copilot -p in launchd/cron yourself (which is exactly the standing pattern you already use), or lean on /delegate for cloud execution.


Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment