Back to all articles
TutorialAI Engineering10 min read

Mastering the GitHub Copilot App: A Hands-On Guide to Diff, Terminal, and Browser Panels

Zayd Zarrouk
Zayd ZarroukFounder & Product Engineer
github-copilotai-agentsgit-worktreessoftware-engineeringdeveloper-tools

When an AI agent modifies your codebase, verifying the changes traditionally requires a disjointed, manual workflow. You have to switch to your editor to inspect the code, open a terminal window to run the build or test suite, and launch an external browser to verify the user interface. This constant context-switching degrades focus and slows down development.

To solve this, the GitHub Copilot app was released for General Availability on June 17, 2026, as detailed in the GitHub Copilot app GA announcement. Built on top of the GitHub Copilot CLI, this standalone desktop application serves as an agent-native orchestration environment. It introduces a unified workspace where you can run multiple agent sessions in parallel, each isolated inside its own Git worktree, while managing the entire lifecycle via three tightly integrated panels: Diff, Terminal, and Browser.

In this hands-on tutorial, you will learn how to set up the GitHub Copilot app, initialize an agent session, review code modifications using the Diff panel, run local development scripts via the Terminal panel, and visually refine a UI component using the Pick & Polish tool in the Browser panel.


1. Understanding the Architecture of the GitHub Copilot App

Before diving into the code and configuration, it is critical to understand how the GitHub Copilot app differs from standard in-editor extensions (like those in VS Code or JetBrains). Traditional extensions are designed for inline assistance—one chat window, one file, and one task at a time. The GitHub Copilot app is designed for fleet supervision, as explained in the official GitHub Copilot app documentation.

The core architectural innovation is the use of isolated Git worktrees. When you start an agent session, the app does not run commands directly inside your active working directory. Instead, it creates an isolated physical copy of your repository linked to a dedicated branch. This allows you to dispatch multiple agents simultaneously—for example, one agent refactoring an API endpoint, another building a UI component, and a third writing unit tests—without any risk of them overwriting each other's uncommitted work.

The application supports three operational modes:

  • Interactive: A collaborative, conversational mode where you and the agent iterate on changes line-by-line.
  • Plan: The agent generates a structured plan of action, which you must explicitly review and approve before any code is modified.
  • Autopilot: A fully autonomous execution mode designed for background tasks and automated pipelines.

Additionally, the app features bidirectional "Canvases" (initialized via the /create-canvas command) that allow humans and agents to collaborate on plans, pull requests, and live application previews.


2. Prerequisites and Environment Setup

To follow this tutorial, ensure your development machine meets the following requirements as of September 10, 2026:

  • Operating System: macOS, Windows, or Linux.
  • Git: Version 2.34.0 or higher installed and configured locally.
  • Node.js: Version 18.0.0 or higher (LTS recommended) to run our local web application server.
  • Subscription: An active GitHub Copilot plan (Student, Pro, Pro+, Business, or Enterprise). For Business and Enterprise accounts, ensure your organization administrator has enabled the Copilot CLI policy, as noted in the GitHub Community discussion.

Step 1: Install the App

Download the installer for your platform from the official GitHub Copilot app landing page. Once installed, launch the application and click Sign in to GitHub to authorize the application with your account credentials.

Step 2: Initialize a Sample Web Project

We will use a minimal Node.js project to demonstrate the interaction loop. Create a new directory and initialize a basic HTTP server that serves an HTML page with a simple rating interface. Run the following commands in your terminal:

mkdir copilot-demo
cd copilot-demo
npm init -y
mkdir public

Now, create a file named server.js in the root of your project and paste the following code, which sets up a basic static file server:

import http from 'node:http';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const PORT = process.env.PORT || 3000;

const server = http.createServer((req, res) => {
  let filePath = path.join(__dirname, 'public', req.url === '/' ? 'index.html' : req.url);
  
  fs.readFile(filePath, (err, content) => {
    if (err) {
      res.writeHead(404, { 'Content-Type': 'text/plain' });
      res.end('File Not Found');
      return;
    }
    res.writeHead(200, { 'Content-Type': 'text/html' });
    res.end(content);
  });
});

server.listen(PORT, () => {
  console.log(`Server running at http://localhost:${PORT}`);
});

Next, create the public/index.html file with a basic skeleton:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Product Page</title>
  <style>
    body { font-family: sans-serif; padding: 2rem; background: #fafafa; color: #333; }
    .container { max-width: 600px; margin: 0 auto; background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .rating-container { margin: 1.5rem 0; }
  </style>
</head>
<body>
  <div class="container">
    <h1>Premium Wireless Headphones</h1>
    <p>Experience high-fidelity sound with active noise cancellation.</p>
    <div class="rating-container" id="rating-area">
      <!-- Copilot will insert the rating component here -->
      <p>No ratings yet.</p>
    </div>
  </div>
</body>
</html>

Initialize a Git repository and commit these files, as the Copilot app requires a Git repository to manage worktrees:

git init
git add .
git commit -m "Initial commit"

3. Step-by-Step Tutorial: The AI Coding Loop in Action

With our project initialized, we can now open the GitHub Copilot app and walk through the core engineering loop described in Kayla Cinnamon's tutorial on the GitHub Blog.

Step 1: Open the Project in the Copilot App

Launch the GitHub Copilot app. On the home screen, select Add Local Folder and choose your copilot-demo directory. The app will analyze your codebase and connect it to a new workspace session.

Step 2: Initialize an Agent Session

In the chat panel, type the following prompt to start a new task:

"Add an interactive 5-star rating component to public/index.html inside the #rating-area div. When a star is clicked, show a text confirmation below it."

The agent will analyze the HTML file and generate the necessary DOM elements, styles, and event listeners.

Step 3: Review the Changes in the Diff Panel

Once the agent finishes generating the code, the Diff Panel will open side-by-side with your chat. This panel highlights additions in green and deletions in red. Take time to inspect the changes:

  • Verify that the CSS styles for the stars are scoped correctly.
  • Ensure the JavaScript click handlers do not introduce potential memory leaks or cross-site scripting (XSS) vulnerabilities.
  • If you notice any issues, you do not need to open your IDE. You can write feedback directly in the chat (e.g., "Make the stars use inline SVG elements instead of Unicode characters"), and the agent will update the diff dynamically.

Step 4: Run the Development Server via the Terminal Panel

To verify that the application runs correctly, we need to spin up our Node.js server. Instead of switching to an external terminal, we will use the integrated Terminal Panel:

  1. Locate the Terminal Panel within the session workspace.
  2. Click the Run button (or configure a reusable script).
  3. Input the command to start the server: node server.js.
  4. Click Run. The terminal will output the server logs:
Server running at http://localhost:3000

Step 5: Preview and Polish in the Browser Panel

Now that the server is running, we can preview the live application directly inside the Copilot app without opening an external web browser. This is done by creating a browser canvas, a feature detailed in Getting Started with the GitHub Copilot app.

  1. In the chat input, type the slash command: /create-canvas.
  2. In the canvas configuration, set the URL to http://localhost:3000.
  3. The built-in browser panel will render your interactive product page. Test the star rating component by clicking on the stars to ensure the confirmation message updates.

If you want to refine the visual appearance of the stars, you can use the Pick & Polish tool:

  1. Toggle Canvas Dev Mode on the browser panel.
  2. Click the Pick & Polish selector tool (represented by a target icon).
  3. Click directly on one of the star elements in the browser preview. This feeds the exact HTML/CSS context of that element directly into the agent's prompt context.
  4. Type your refinement instruction in the input field: "Make the active stars gold, add a transition effect on hover, and increase their font size to 2rem."
  5. The agent will regenerate the styles, update the Diff panel, and hot-reload the canvas so you can immediately see the updated UI.

Step 6: Accept and Create a Pull Request

Once you are satisfied with both the code structure and the visual output, click the Accept button in the Copilot app. The app will automatically commit the changes to your isolated session branch and provide an option to open a pull request. This seamless integration with the Git lifecycle aligns perfectly with modern workflows, such as those optimized by the refreshed repository pull requests page on GitHub.


4. Simulating Agent Orchestration

To better understand how the GitHub Copilot app manages multiple parallel agent sessions under the hood, we can write a Node.js simulation. This script demonstrates how the app coordinates separate tasks, tracks their status, and executes terminal commands using standard ES module syntax.

This script is fully runnable and uses only Node.js built-in modules. It simulates starting two parallel agent sessions (one for UI styling and one for API validation) and printing their status updates to the console.

import { EventEmitter } from 'node:events';

class AgentSessionManager extends EventEmitter {
  constructor() {
    super();
    this.sessions = new Map();
  }

  createSession(id, task, branch) {
    const session = {
      id,
      task,
      branch,
      status: 'initialized',
      worktreePath: `/tmp/copilot-worktrees/${branch}`,
      logs: []
    };
    this.sessions.set(id, session);
    this.emit('sessionCreated', session);
  }

  async runSessionTask(id) {
    const session = this.sessions.get(id);
    if (!session) return;

    session.status = 'running';
    this.emit('sessionUpdated', session);

    // Simulate agent processing and writing code
    await new Promise((resolve) => setTimeout(resolve, 100));
    session.logs.push(`[${session.id}] Created branch ${session.branch}`);
    session.logs.push(`[${session.id}] Isolated worktree mounted at ${session.worktreePath}`);
    session.logs.push(`[${session.id}] Modified files to complete task: "${session.task}"`);
    
    session.status = 'completed';
    this.emit('sessionCompleted', session);
  }
}

// Execution block
const manager = new AgentSessionManager();

manager.on('sessionCreated', (session) => {
  console.log(`[SYSTEM] Session ${session.id} initialized for branch: ${session.branch}`);
});

manager.on('sessionCompleted', (session) => {
  console.log(`[SYSTEM] Session ${session.id} finished successfully.`);
  session.logs.forEach(log => console.log(`  - ${log}`));
});

console.log("Starting parallel agent session orchestration simulation...");

manager.createSession('session-1', 'Add star rating CSS transition', 'feature/star-styling');
manager.createSession('session-2', 'Add validation logic to server.js', 'feature/api-validation');

// Run sessions concurrently
await Promise.all([
  manager.runSessionTask('session-1'),
  manager.runSessionTask('session-2')
]);

console.log("All simulated parallel agent sessions have finished processing.");

5. Common Errors and Troubleshooting

While the Copilot app simplifies agent-driven development, you may run into environment or configuration issues. Below are common failure modes and how to resolve them:

Symptom / Error Root Cause Resolution
Failed to create worktree: branch already exists The agent tried to initialize a session on a Git branch name that already exists in your local repository. Delete the conflicting local branch using git branch -d <branch-name>, or let Copilot auto-generate a unique suffix for the session branch.
Canvas connection refused: http://localhost:3000 The local development server is either not running, or is listening on a different port/host (e.g., 127.0.0.1 instead of localhost). Verify the terminal logs in the Terminal panel. Ensure the server is actively running and update the Canvas URL to match the exact host and port.
Copilot CLI policy disabled by administrator For Copilot Business/Enterprise users, the organization administrator has not enabled the required CLI policy in the GitHub settings. Contact your organization administrator and request that they enable the "Copilot CLI" policy in the organization's Copilot settings.

6. Next Steps

Now that you have mastered the basic loop of reviewing code changes, executing terminal commands, and using the Pick & Polish browser canvas, you can explore more advanced agent-driven patterns:

  • Model Customization: Configure Bring Your Own Model (BYOM) settings to connect external model providers using your own API keys.
  • Cloud Automations: Schedule recurring agent workflows in the cloud so your local machine doesn't need to stay awake to run tests or verify pull requests.
  • MCP Servers: Connect Model Context Protocol (MCP) servers to grant your agents access to external tools, databases, and APIs.

For deeper explorations of modern AI interfaces, check out our guide on building natural voice experiences with GPT-Live-1 in the API to see how conversational interfaces are evolving alongside agentic desktop environments.

Frequently asked questions

What is the GitHub Copilot app?

The GitHub Copilot app is a standalone desktop application launched in June 2026 that serves as a control center for orchestrating multiple parallel AI agent sessions, each running in an isolated Git worktree.

How do isolated worktrees prevent branch conflicts?

Each agent session is allocated its own distinct Git worktree (a physical copy of the repository linked to a specific branch). This prevents parallel agents from overwriting or clobbering each other's active directories.

What is the Pick & Polish tool?

It is a visual selection tool inside the Copilot app's Browser Panel. By enabling Canvas Dev Mode, you can select any UI element on your running web page and prompt the agent to refine or style that specific component.

Sources

  1. GitHub Copilot app generally available — The GitHub Blog
  2. About the GitHub Copilot app - GitHub Docs — GitHub Docs
  3. GitHub Copilot app generally available 🚀 · community · Discussion #199129 — GitHub
  4. GitHub Copilot app for Beginners: Using the diff, terminal, and browser — The GitHub Blog
  5. GitHub Copilot app for Beginners: Getting started — The GitHub Blog

Continue exploring