Copilot Chat: external-agent (Claude) delegated sessions missing from Copilot Chat's own history
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
**Extension:** GitHub Copilot Chat 0.65.0
**VS Code server build:** `645f29cc3176500b4b5762ba887cf2a7f0ffdf2c`
**Repro**
1. In Copilot Chat, start a session targeting the Claude external agent.
2. Let it run, close/finish.
3. Open Copilot Chat's own sidebar chat list.
**Expected:** session appears in Copilot Chat's history.
**Actual:** session missing from Copilot Chat's history entirely.
**Root cause (confirmed via transcript inspection)**
Copilot spawns the Claude Agent SDK (TS) as an external agent with `cwd` set to a per-chat scratch folder `~/.copilot/chats//`. Confirmed from actual session transcript metadata:
```
"entrypoint":"sdk-ts"
"cwd":"/home/codespace/.copilot/chats/"
"userType":"external"
```
The SDK/CLI writes its own transcript under `~/.claude/projects//*.jsonl` (Claude Code's normal per-cwd session store) — this succeeds and Claude Code's own session list shows it correctly.
Copilot Chat's own sidebar history appears to be keyed off `~/.copilot/chats//` (or a DB record pointing there) — that directory does not exist on disk afterward, so Copilot's own list has nothing to read, even though the delegated run completed successfully and its transcript survives elsewhere.
Two independent persistence stores for one execution; the Copilot-side one isn't surviving/persisting for Claude-targeted external-agent sessions.
**Impact:** users lose visibility into past Claude-delegated sessions from within Copilot Chat's UI; the only place they remain visible is Claude Code's own separate session list (if that extension happens to be installed).
Contributor guide
Assessment
This issue has not been assessed yet.