SesameSesame

Copilot

GitHub Copilot agent for AI-assisted coding

GitHub Copilot is GitHub's AI coding assistant, deeply integrated with the GitHub ecosystem. It excels at understanding repository context and GitHub workflows.

Overview

FeatureDetails
ProviderGitHub (Microsoft)
CLI Toolgh copilot
Auth MethodsCopilot subscription only
StrengthsGitHub integration, repository context

Authentication

Copilot requires a GitHub Copilot subscription. API keys are not available.

Subscription Setup

  1. Ensure you have an active Copilot subscription:

    • Individual ($10/mo)
    • Business ($19/mo per user)
    • Enterprise (contact sales)
  2. Create a fine-grained Personal Access Token:

    • Go to GitHub PAT Settings
    • Name: "Sesame Copilot"
    • Expiration: Your preference (90 days recommended)
    • Permissions: Select Copilot
  3. In Sesame: Avatar → Agent Credentials → Copilot → Paste token

This token is separate from the GitHub PAT used for repository access. The Copilot token specifically needs the "Copilot" permission.

Environment Variables

VariableDescription
COPILOT_GITHUB_TOKENGitHub token with Copilot permission
GH_TOKENFallback: General GitHub token
GITHUB_TOKENFallback: General GitHub token

The token is checked in the order above.

Capabilities

Copilot can:

  • Understand repository structure and history
  • Generate code following project patterns
  • Create GitHub Actions workflows
  • Write documentation and README files
  • Fix issues referenced by number
  • Create pull request descriptions

Best Practices

Repository Context

Copilot excels when given GitHub-specific context:

"Fix issue #42 by updating the authentication middleware
 to handle expired tokens gracefully."

GitHub Workflows

Copilot is great for GitHub-specific tasks:

"Create a GitHub Actions workflow that runs tests on
 pull requests and deploys to staging on merge to main."

Project Conventions

Reference existing code:

"Add a new API endpoint for user preferences, following
 the same patterns used in the existing user routes."

Troubleshooting

"Copilot access denied"

  • Verify your Copilot subscription is active
  • Check the token has the "Copilot" permission
  • For organization repos, ensure Copilot is enabled for the org

Token not working

  1. Verify the token at GitHub Token Settings
  2. Ensure the token hasn't expired
  3. Create a new token with Copilot permission
  4. Update in Sesame's Agent Credentials

Organization restrictions

Some organizations restrict Copilot usage:

  • Check with your organization admin
  • Organization may need to enable Copilot for members
  • Some orgs require Business or Enterprise plans

"Rate limited"

  • Copilot has usage limits based on your plan
  • Individual plan has lower limits than Business/Enterprise
  • Wait and retry if rate limited

CLI Reference

Copilot uses the GitHub CLI:

# Ensure GitHub CLI is installed
gh --version

# Copilot commands
gh copilot suggest "your prompt"
gh copilot explain "code to explain"

Pricing

PlanCostFeatures
Individual$10/monthPersonal use
Business$19/month per userTeam features, admin controls
EnterpriseContact salesAdvanced security, compliance

All plans include unlimited suggestions. For details, see GitHub Copilot Pricing.

GitHub Integration

Copilot works seamlessly with GitHub features:

  • Issues: Reference issues by number in prompts
  • Pull Requests: Generates PR descriptions
  • Actions: Creates and debugs workflows
  • Discussions: Can reference discussion context
  • Code Search: Understands repository code patterns

On this page