github / github/copilot-sdk

Support updating a session's `gitHubToken` without recreating the session

Abierto
#2,365 3 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Java
Estrellas
10.5k
Forks
1.5k
Merge medio
1 d 11 h
PR fusionados (30 d)
128

Descripción

## Problem

`gitHubToken` can only be set at session creation (`SessionConfigBase.gitHubToken`). `session.rpc.options.update()` (rpc.d.ts) has no token/auth field, and no other RPC accepts a replacement token for a live session.

If the token backing a session rotates or is revoked externally, there's no way to refresh it in place — every subsequent turn 401s until the host closes and recreates the session, losing session continuity.

## Request

Support updating a running session's `gitHubToken`, re-resolving the GitHub identity the same way session creation does. Either:
1. Allow `gitHubToken` in `SessionUpdateOptionsParams`, or
2. A dedicated RPC (e.g. `session.rpc.auth.refresh({gitHubToken})`)

Session state (history, mode, loaded skills) should be preserved — that's the point of avoiding close+recreate.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Read rpc.d.ts and SessionConfigBase first, then trace session.rpc.options.update() and the token handling used during session creation. Define and implement one supported live-session update path, re-resolve the GitHub identity, and verify that history, mode, and loaded skills remain intact.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github, typescript
Área
api, authentication, backend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.