The copilot --resume Remote tab calls a live Copilot API, not the local session store.
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
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.
The response contains a sessions array. Each entry includes fields like:
idnamestaterepo_idhead_refbase_refcreated_atlast_updated_atcompleted_atremote_steerableresource_stateworkflow_run_idtask_id
- The API appears to return the most recent 20 sessions regardless of the
limitquery parameter. - The CLI can safely truncate locally after fetching.
stateandresource_stateare enough to render a simple remote-session list.- If a shared file is Markdown and contains an
# H1heading, use that heading as the GitHub Gist description.
URL: https://gist.github.com/monperrus/0157881a00c42a285c02268c56e7f395