Fix GitHub Copilot Agent Mode Failures in 5 Minutes

Resolve 'Agent mode unavailable' and timeout errors in VS Code's GitHub Copilot with these proven configuration fixes.

Problem: Copilot Agent Mode Won't Start

You click "Start Agent Mode" in VS Code and get "Agent mode unavailable" or the agent times out mid-task without explanation.

You'll learn:

  • Why agent mode fails after VS Code updates
  • How to fix workspace trust and extension conflicts
  • When to reset Copilot's authentication state

Time: 5 min | Level: Intermediate


Why This Happens

Agent mode requires elevated permissions and workspace trust that standard Copilot chat doesn't need. Common triggers:

Common symptoms:

  • "Agent mode is currently unavailable" notification
  • Agent starts but times out after 10-15 seconds
  • Works in some workspaces but not others
  • Extension conflict warnings in Output panel

Solution

Step 1: Verify Workspace Trust

Agent mode won't start in untrusted workspaces - this is a security feature.

# Check current trust status
# In VS Code: Cmd/Ctrl + Shift + P → "Workspaces: Manage Workspace Trust"

Expected: Green checkmark next to workspace name

If untrusted:

  1. Click "Trust Workspace and Continue"
  2. Reload window (Cmd/Ctrl + R)

Why this works: Agent mode can execute Terminal commands and modify files, so VS Code requires explicit trust before enabling it.


Step 2: Clear Copilot Cache

Stale authentication tokens cause timeout failures.

# On macOS/Linux
rm -rf ~/Library/Application\ Support/Code/User/globalStorage/github.copilot

# On Windows
rmdir /s "%APPDATA%\Code\User\globalStorage\github.copilot"

Then restart VS Code completely (Cmd/Ctrl + Q, not just reload window)

Expected: Copilot re-authenticates on next use

If it fails:

  • Error: "Directory not found": Check VS Code Insiders path uses Code - Insiders instead
  • Still timing out: Proceed to Step 3

Step 3: Check Extension Conflicts

Some extensions intercept Copilot's LSP communication.

# Disable all extensions except Copilot
# In VS Code: Cmd/Ctrl + Shift + P → "Extensions: Disable All Installed Extensions"
# Then: Enable only GitHub Copilot and GitHub Copilot Chat

Test agent mode now. If it works, re-enable extensions one by one to find the culprit.

Known conflicts (Feb 2026):

  • Tabnine: Conflicts with LSP, disable if using Copilot
  • IntelliCode API: Can intercept completion requests
  • Older ESLint versions: Update to v3.0.5+

Why this works: Agent mode uses a dedicated LSP server that some extensions block by accident.


Step 4: Update Agent Mode Settings

Force agent mode to use stable endpoints.

// Add to settings.json (Cmd/Ctrl + Shift + P → "Preferences: Open Settings (JSON)")
{
  "github.copilot.advanced": {
    "debug.useNodeFetcher": false,
    "debug.useElectronFetcher": true,
    "agent.timeout": 60000
  }
}

Why this works:

  • useElectronFetcher: Uses VS Code's network stack instead of Node's (more reliable)
  • timeout: 60000: Extends timeout to 60 seconds for complex tasks

Reload window after saving.


Verification

Test agent mode with a simple task:

In Copilot Chat:
"@workspace Create a new file called test.txt with 'Hello Agent'"

You should see:

  1. Agent mode activates (blue "Agent Mode" badge)
  2. Task completes within 5-10 seconds
  3. File appears in workspace

If still failing: Check VS Code Output panel (View → Output → GitHub Copilot) for specific error codes.


What You Learned

  • Agent mode requires workspace trust - standard Copilot doesn't
  • Authentication cache can become stale after VS Code updates
  • Extension conflicts are the #1 cause of timeout failures
  • Electron fetcher is more reliable than Node fetcher in corporate networks

Limitation: Agent mode is experimental - some failures are upstream bugs, not config issues.


Advanced Troubleshooting

Corporate Network Issues

If you're behind a corporate proxy:

// settings.json
{
  "http.proxy": "http://proxy.company.com:8080",
  "http.proxyStrictSSL": false,
  "github.copilot.advanced": {
    "debug.useNodeFetcher": false,
    "debug.useElectronFetcher": true
  }
}

Check Copilot Logs

Enable verbose logging to debug specific failures:

// settings.json
{
  "github.copilot.advanced": {
    "debug.overrideLogLevel": "debug"
  }
}

View logs: Output panel → GitHub Copilot

Look for:

  • [ERROR] Agent mode initialization failed: <reason>
  • [WARN] LSP server not responding
  • [INFO] Authentication token expired

Rate Limiting

If agent mode works initially but fails after multiple uses:

Symptom: "Rate limit exceeded" in logs

Fix: Wait 5 minutes, then retry. GitHub Copilot has per-hour request limits in agent mode.

Workaround: Use standard chat for simpler queries, reserve agent mode for complex multi-file tasks.


Common Error Messages

ErrorCauseFix
"Agent mode unavailable"Workspace not trustedEnable trust in workspace settings
"Request timeout"Extension conflict or network issueDisable extensions, check proxy settings
"Authentication failed"Stale tokenClear Copilot cache (Step 2)
"LSP server not responding"Corrupted extensionReinstall GitHub Copilot extension
"Rate limit exceeded"Too many requestsWait 5 minutes before retrying

When to File a Bug

If none of these steps work:

  1. Collect logs: Output panel → GitHub Copilot (save to file)
  2. Get version info: Cmd/Ctrl + Shift + P → "GitHub Copilot: Show Version"
  3. File issue: github.com/github/copilot-feedback

Include:

  • VS Code version
  • Copilot extension version
  • Minimal reproduction steps
  • Redacted log excerpt showing the failure

Tested on VS Code 1.87.0, GitHub Copilot 1.156.0, macOS Sonoma & Windows 11