GitHub Copilot Agent Mode¶
Local, synchronous agentic execution that reads files, runs code, checks output, and iterates to fix errors.
How it works¶
Agent mode turns Copilot from a suggestion engine into an autonomous executor. When you submit a prompt, Copilot iterates across files and works through changes autonomously. It proposes changes across multiple files, runs terminal commands, checks output, finds errors, and loops back to fix them. It can install packages, run tests, and migrate code. The session mode and effective permission policy determine which actions need approval (GitHub permission guidance).
Agent mode runs in VS Code and is generally available in JetBrains, Eclipse, and Xcode.
Assisted permissions¶
GitHub made Assisted permissions generally available in Copilot CLI, the Copilot app, and VS Code on October 26, 2026. This announcement does not extend Assisted availability to JetBrains, Eclipse, or Xcode (GA announcement).
Existing deny rules and enterprise restrictions still apply. Assisted sends unresolved eligible command, path, and URL requests to model review. In CLI, enterprise ask rules for shell commands, file reads, file writes, and URLs can receive model approval. Other tool calls requiring enterprise approval and sandbox-bypass requests stay under normal permission handling. In autopilot and non-interactive runs, requests that still need your approval are denied (Assisted permission behavior).
GitHub's documentation disagrees on ask. The enterprise reference says auto-approval cannot satisfy it; the Assisted guide states the eligible CLI exception above. Do not treat ask as an unconditional human-review guarantee in Assisted CLI. In VS Code, granular deny, ask, and allow rules apply to Copilot sessions using Agent Host (enterprise reference). See the enforcement prerequisite for the session boundary.
Administrators control Allow All and Assisted separately through disableBypassPermissionsMode and disableAssistedPermissionsMode. A default mode supplies a starting choice, not a restriction. A prohibited default falls back to manual approval (enterprise settings, GA announcement).
In CLI, --assisted-approval leaves --allow-all-paths and --allow-all-urls unchanged. If Assisted cannot turn on, CLI warns on stderr but preserves a separate --allow-all-tools option. Check both the warning and the remaining grants. The review model can differ from the chat model; bring-your-own-key sessions use the session model. Copilot cloud sessions have no tool permission controls (Assisted guide).
Planning mode¶
For complex tasks, Copilot generates a plan that lists all steps before it makes changes. The plan supports structured reasoning and progress tracking.
Multi-file editing¶
Copilot Edits lets you name a set of files and describe changes in plain language. Copilot then proposes inline edits across those files, one round at a time.
Vision¶
Feed Copilot a screenshot, mockup, or image and it generates the UI code and implementation details.
Inline agent mode (JetBrains)¶
Inline agent mode hosts the same agent toolkit — workspace search, multi-file edits, terminal commands, and editor lint and compile error reads (GitHub Changelog 2025-05-19) — in the JetBrains inline chat popover instead of the chat tool window, in public preview since April 24, 2026 (GitHub Changelog 2026-04-24). Open inline chat with Shift+Ctrl+I (Windows) or Shift+Cmd+I (Mac), right-click and select Open Inline Chat, or click the gutter icon, then switch the popover to agent mode. On Copilot Business and Enterprise, an admin must enable the Editor preview features policy before the surface appears. The plugin needs JetBrains IDE 2025.2 or later, because GitHub ended support for 2025.1 (GitHub Changelog 2026-10-10).
Diagnostic intention menus include a Fix action that opens inline chat and asks Copilot to repair the issue. It "uses agent mode when it is available and ask mode otherwise" (GitHub Changelog 2026-10-10). The changelog does not say what makes agent mode unavailable.
| Dimension | Inline agent mode | Chat-panel agent mode |
|---|---|---|
| Invocation | Shift+Ctrl/Cmd+I from the editor |
Tool window |
| Anchoring | Active selection / cursor / file | Workspace, last-active file |
| Plan and diff render area | Inline popover | Full chat tool window |
| Best fit | Selection-scoped edits, quick fixes against editor errors | Multi-file changes, long plans, terminal output review |
The trade is invocation cost against legibility: inline shortens the path from looking at code to having an agent act on it, while the chat panel keeps plans, file lists, and terminal output readable as a run grows — switch surfaces once a run outgrows the popover. The same release shipped Global Auto Approve settings (Settings > GitHub Copilot > Chat > Auto Approve) that approve every tool call across all workspaces, including destructive ones; combined with low-friction inline invocation this removes the confirmation gate for agent-initiated changes, so keep it off outside sandboxed workspaces (GitHub Changelog 2026-04-24).
Why it works¶
Per GitHub's agent mode overview, the loop works because the language model reasons about the next step and issues tool calls to gather information or act — reading files, editing, running terminal commands. After each edit or command, agent mode inspects syntax errors, terminal output, test results, and build failures to decide how to course-correct. Deterministic feedback signals from the compiler, linter, and tests anchor the loop. The more structured the signals, the faster it converges.
When this backfires¶
Agent mode degrades when the feedback loop is weak or the task exceeds its context window:
- Large refactors across many files. GitHub's own guidance positions agent mode for low-to-medium complexity changes in well-tested repositories and small refactors — not massive rewrites, cross-repo changes, or codebases with little test coverage. Work one module at a time, and avoid "rewrite the app in one shot."
- Trial-and-error loops. When the agent cannot reconcile a failing test, it can repeatedly retry without convergence, burning credits on tokens that buy no progress, before stalling. Set a max-retry ceiling, or hand off to ask or edit mode on stalls.
- First-step assumption drift. A wrong assumption in step one propagates, so every later edit, test, and fix inherits it. Planning mode reduces this but does not eliminate it.
- Rate limits and context ceilings. Agent mode consumes GitHub AI credits, metered by the tokens each interaction uses, and rate-limits the most powerful models, so sustained work across dozens of files is costly. On April 20, 2026, GitHub paused new signups for Pro, Pro+, and Student plans, added session and weekly token-based limits, and removed Opus models from the Pro tier — citing agent-mode workloads as the cause. That direction became the whole model on June 1, 2026, when GitHub retired premium requests: budget tokens, not request counts. To ease that budgeting, GitHub made Auto mode in Copilot Chat generally available to all users on June 17, 2026, auto-selecting the model per request rather than pinning one high-rate model for every turn.
Key Takeaways¶
- Agent mode is the local, synchronous counterpart to the async coding agent
- It iterates through edits and checks; permission mode and effective policy determine approval requirements
- Planning mode adds transparency for complex multi-step tasks
- Generally available across VS Code, JetBrains, Eclipse, and Xcode