github / github/copilot-sdk

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

オープン
#2,365 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Java
スター
10.5k
フォーク
1.5k
平均マージ
1日 11時間
マージ済み PR(30日)
127

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, typescript
領域
api, authentication, backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。