Expected legacy Copilot CLI migration refusal is logged as an Agent Host error
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Type of issue
Bug / misleading error logging
## Description
A legacy Copilot CLI migration probe intentionally subscribes to the Agent Host twin of a legacy session. When that session is not adoptable, the host correctly rejects the probe with `AHP_SESSION_NOT_FOUND` and the migration layer treats it as a normal `declined` outcome.
The generic protocol layers nevertheless log the expected response as both a server error and a client warning:
```text
2026-09-07 17:19:56.978 [trace] [AgentService] restoreSession start: copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2
2026-09-07 17:19:56.981 [trace] [AgentService] restore: catalog and registry resolved for copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2 (registered=false, external=false)
2026-09-07 17:19:56.981 [info] [AgentService] restore refused for unregistered copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2: not an adoptable legacy chat (reason=unknown)
2026-09-07 17:19:56.986 [error] [ProtocolServer] Request 'subscribe' failed Session is not an adoptable legacy chat: copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2
2026-09-07 17:19:57.002 [warning] [RemoteAgentHostProtocol] Request 45 failed: {"code":-32001,"message":"Session is not an adoptable legacy chat: copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2"}
```
AHP transport confirms this is the expected `NotFound` response to the probe:
```json
{"jsonrpc":"2.0","id":45,"method":"subscribe","params":{"channel":"copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2"}}
{"jsonrpc":"2.0","id":45,"error":{"code":-32001,"message":"Session is not an adoptable legacy chat: copilotcli:/untitled-1dbbe3c5-a260-4612-b087-acc1b3f779b2"}}
```
I saw the same warning for multiple distinct `copilotcli:/untitled-*` sessions across recent Insiders windows, so it adds significant noise to Agent Host log scans.
## Expected behavior
The migration layer should continue receiving the `NotFound` response and treating it as `declined`, but this expected probe outcome should not produce generic error/warning entries.
The suppression must be scoped specifically to the migration probe. Other failed `subscribe` requests—including stale normal sessions, missing resource watches/catalogs, and future subscription bugs—should remain logged.
## Version
Code - Insiders, commit `94b021b519e8e3e99777a1ff72c77e32e0d4b1d3` (logs captured 2026-09-07).
Contributor guide
Assessment
This issue has not been assessed yet.