Skip to content

Instantly share code, notes, and snippets.

@monperrus
Last active May 8, 2026 07:28
Show Gist options
  • Select an option

  • Save monperrus/0157881a00c42a285c02268c56e7f395 to your computer and use it in GitHub Desktop.

Select an option

Save monperrus/0157881a00c42a285c02268c56e7f395 to your computer and use it in GitHub Desktop.
Copilot remote sessions endpoint

Copilot remote sessions endpoint

The copilot --resume Remote tab calls a live Copilot API, not the local session store.

Endpoint

GET https://api.individual.githubcopilot.com/agents/sessions?limit=20&integration_id=copilot-developer-cli

To create a new remote session:

POST https://api.individual.githubcopilot.com/agents/sessions

Auth

Use a GitHub access token:

Authorization: Bearer <token>
Accept: application/json

gh auth token works for local testing.

An empty JSON body already returns 201 Created and yields a queued session named New task.

Response shape

The response contains a sessions array. Each entry includes fields like:

  • id
  • name
  • state
  • repo_id
  • head_ref
  • base_ref
  • created_at
  • last_updated_at
  • completed_at
  • remote_steerable
  • resource_state
  • workflow_run_id
  • task_id

Notes

  • The API appears to return the most recent 20 sessions regardless of the limit query parameter.
  • The CLI can safely truncate locally after fetching.
  • state and resource_state are enough to render a simple remote-session list.
  • If a shared file is Markdown and contains an # H1 heading, use that heading as the GitHub Gist description.

URL: https://gist.github.com/monperrus/0157881a00c42a285c02268c56e7f395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment