Skip to content

Never suggest tools.github mode: remote in agent prompts#22709

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-prompts-never-suggest-remote
Mar 24, 2026
Merged

Never suggest tools.github mode: remote in agent prompts#22709
pelikhan merged 2 commits intomainfrom
copilot/update-prompts-never-suggest-remote

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

mode: remote for GitHub tools does not work with the GitHub Actions GITHUB_TOKEN — it requires a special PAT or GitHub App token with MCP access. Several agent prompt files were incorrectly showing it as the recommended/correct configuration.

Changes

  • AGENTS.md — Removed mode: remote from the ✅ CORRECT example; added explicit "Never use mode: remote" bullet with explanation
  • create-agentic-workflow.md — Removed mode: remote from the CORRECT example block; rewrote the Mode configuration note to prohibit remote mode
  • upgrade-agentic-workflows.md — Migration example new-format no longer includes mode: remote; added inline comment explaining why
  • runbooks/workflow-health.md — Removed mode: remote from all 8 resolution/quick-reference examples
  • github-mcp-server.md — Replaced mode: "remote" config example with local-only; added ⚠️ warning block
  • github-agentic-workflows.md — Updated mode: field docs to say "do NOT use remote"

Before (multiple files showed this as correct):

tools:
  github:
    mode: remote
    toolsets: [default]

After:

tools:
  github:
    toolsets: [default]   # mode: local is the default and the only supported mode with GITHUB_TOKEN

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Update prompts to never suggest tools.github mode: remote Never suggest tools.github mode: remote in agent prompts Mar 24, 2026
Copilot AI requested a review from pelikhan March 24, 2026 14:33
@pelikhan pelikhan marked this pull request as ready for review March 24, 2026 14:43
Copilot AI review requested due to automatic review settings March 24, 2026 14:43
@pelikhan pelikhan merged commit 7a41931 into main Mar 24, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/update-prompts-never-suggest-remote branch March 24, 2026 14:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates agent prompt and workflow documentation to prohibit recommending tools.github mode: remote, because it does not work with the GitHub Actions GITHUB_TOKEN and requires different authentication.

Changes:

  • Removes mode: remote from multiple “correct” configuration examples across agent/workflow docs.
  • Adds explicit guidance/warnings that mode: remote should not be used in GitHub Actions contexts.
  • Updates reference docs for the tools.github.mode field to steer readers to the supported default behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
AGENTS.md Removes mode: remote from the “CORRECT” example and adds a “never use remote” key point.
.github/aw/create-agentic-workflow.md Removes mode: remote from the recommended snippet and rewrites the mode guidance to prohibit remote in Actions.
.github/aw/upgrade-agentic-workflows.md Updates the migration guidance to avoid including mode: remote in the new-format example and explains why.
.github/aw/runbooks/workflow-health.md Removes mode: remote from multiple troubleshooting/configuration snippets.
.github/aw/github-mcp-server.md Updates the example config to omit remote mode and adds a warning block against remote in Actions.
.github/aw/github-agentic-workflows.md Updates the mode: field description to explicitly warn against remote mode with GITHUB_TOKEN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 148 to 156
# Old format (deprecated)
mcp-servers:
github:
mode: remote

# New format
# New format (do NOT include mode: remote - it does not work with GitHub Actions token)
tools:
github:
mode: remote
toolsets: [default]
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration snippet still shows mode: remote in the "Old format (deprecated)" example. Since this doc is part of the guidance to copy/paste during upgrades, leaving mode: remote here undermines the stated rule to never suggest remote mode. Update the old-format example to avoid mode: remote (or add an explicit inline comment on that line that it must be removed/replaced because it won’t work with GITHUB_TOKEN).

Copilot uses AI. Check for mistakes.
private-key: ${{ secrets.APP_PRIVATE_KEY }}
```

> ⚠️ **Do NOT use `mode: remote`** in GitHub Actions workflows. Remote mode does not work with the GitHub Actions token (`GITHUB_TOKEN`) — it requires a special PAT or GitHub App token with MCP access. The default `mode: local` (Docker-based) works with `GITHUB_TOKEN` and should always be used.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new warning calls the default mode: local "Docker-based", but earlier in this document local mode is described as running gh mcp as a local subprocess. Please reconcile these descriptions (either adjust the warning text or update the overview/authentication sections) so readers don’t get conflicting guidance about what “local” actually means.

Suggested change
> ⚠️ **Do NOT use `mode: remote`** in GitHub Actions workflows. Remote mode does not work with the GitHub Actions token (`GITHUB_TOKEN`) — it requires a special PAT or GitHub App token with MCP access. The default `mode: local` (Docker-based) works with `GITHUB_TOKEN` and should always be used.
> ⚠️ **Do NOT use `mode: remote`** in GitHub Actions workflows. Remote mode does not work with the GitHub Actions token (`GITHUB_TOKEN`) — it requires a special PAT or GitHub App token with MCP access. The default `mode: local` (which runs `gh mcp` as a local subprocess) works with `GITHUB_TOKEN` and should always be used.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants