1790
*/
1791
async getSessionMetadata(session: URI): Promise<IAgentSessionMetadata | undefined> {
1792
>
// Don't trigger a cold SDK download just to hydrate session metadata
claudeAgent.ts
1793
>
// during restore (the renderer subscribes to the last-active session
1794
>
// on startup). Mirrors `listSessions` / `getSessionMessages`: when the
1795
>
// SDK isn't local yet, defer. The download fires (with host-level
1796
>
// progress) once the user sends the first message, after which the
1797
>
// session re-hydrates on the next restore.
1798
>
if (!(await this._sdkService.canLoadWithoutDownload())) {
1799
this._logService.info('[Claude] SDK not downloaded yet; deferring session metadata until a session triggers the download');
1800
return undefined;