AHP 0.7: native resume uses a derived /chat URI instead of advertised defaultChat
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Summary
The experimental native AHP client can discover an existing session on the VS Code agent host, but resume fails at the chat resource. The failed resource has the form <sessionUri>/chat, which differs from the defaultChat advertised in that session's state.
The intended workflow is for unmodified Copilot CLI and unmodified VS Code to access one server-backed session.
Observed versions
- Official Copilot CLI 1.0.85 stable.
- Official standalone Copilot CLI 1.0.86-0 prerelease, not an updated payload selected by an older launcher.
- Official VS Code Server 1.132.0, commit
df53daabb18cd157bdb08c7f01c34df936cf12f4. - Stock VS Code 1.137.0 connects and authenticates to the same agent host. This observation alone is not a claim of complete two-client conversation compatibility.
- The tested CLI and host negotiate AHP 0.7.0.
- CLI AHP mode is enabled with
COPILOT_CLI_ENABLED_FEATURE_FLAGS=AHP_CLIENT.
Reproduction
-
Start the official server's native, token-authenticated agent-host listener on loopback, using the normal server entrypoint.
-
Create a Copilot session through AHP with an explicit provider and a provider-specific session URI.
-
Materialize the session using the host-advertised native
/envdiagnostic command. Confirm its completed command turn and thatlistSessionsreturns the session. -
Subscribe to that session and note its actual
defaultChatfield. -
Supply the authenticated endpoint privately through
COPILOT_AHP_URL, then run the stock CLI in a real interactive terminal:copilot --no-auto-update --ahp= --resume <session-uri> -
Resume finds the session, but attachment fails with JSON-RPC error
-32001, identifying a resource ending in/chat.
No model prompt is necessary to reach this failure. An unmaterialized provisional session is not sufficient for this reproduction: it is absent from the catalogue and causes a different, earlier not-found result.
Resource identity
The identifiers below are synthetic and normalized, not captured logs:
S = copilotcli:/11111111-1111-4111-8111-111111111111
Advertised defaultChat = ahp-chat://default/<base64url-encoding-of-UTF8(S), without padding>
Resource identified by the CLI attach failure = S + "/chat"
Both tested CLI versions fail with the same resource shape.
Expected behavior
When SessionState.defaultChat is present, native resume should use that advertised resource rather than assume a chat URI can be constructed by appending /chat to the session URI. Changes to the advertised default chat should also be handled without retaining a stale derived address.
Useful public source anchors:
- The AHP revision imported by this server already defines
SessionState.defaultChat. - The tested reference host constructs the encoded URI in
buildChatUri/buildDefaultChatUri.
Please add a native-client regression case in which the advertised chat URI differs from <sessionUri>/chat, and verify that resume follows the advertised resource.
Boundaries
The failure and advertised state were observed with the official distributions above. The exact proprietary CLI implementation responsible has not been identified from public source; this report does not claim that a particular internal function is at fault.
A separate generic session-create/URI-preservation failure exists and is being investigated independently. Provider omission alone is not established as its cause.
No credentials, real endpoints, local paths, raw logs, private project code, or real session identifiers are included here.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ネイティブの再開/アタッチパスから始め、要求されるリソースを SessionState.defaultChat と比較します。AHP の SessionState 定義と VS Code の buildChatUri/buildDefaultChatUri の参照を使用して、/chat とは異なる、告知された URI を再現します。回帰ケースによって、再開が告知されたリソースを要求し、古い派生アドレスを保持しないことが検証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- api, cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100