{"record":{"id":"317c9f9ba62063f4","repo":"earendil-works/pi","slug":"session-next-id-did-not-provide-a-snapshot","errorCode":null,"errorMessage":"Session ${next.id} did not provide a snapshot","messagePattern":"Session (.+?) did not provide a snapshot","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/client/remote-session.ts","lineNumber":273,"sourceCode":"\n\tasync #trackAttachmentOperation(run: () => Promise<void>): Promise<void> {\n\t\tconst pending = run();\n\t\tthis.#pendingAttachmentOperations.add(pending);\n\t\ttry {\n\t\t\tawait pending;\n\t\t} finally {\n\t\t\tthis.#pendingAttachmentOperations.delete(pending);\n\t\t}\n\t}\n\n\tasync #prepareReplacement(operation: \"open\" | \"create\", prepare: () => Promise<SessionLease>): Promise<void> {\n\t\tconst previous = this.#handle;\n\t\tconst next = await prepare();\n\t\tawait this.#assertNotDisposedAfterAwait(next);\n\t\tconst snapshot = next.snapshot;\n\t\tif (!snapshot) {\n\t\t\tawait this.#detach(next);\n\t\t\tthrow new Error(`Session ${next.id} did not provide a snapshot`);\n\t\t}\n\t\tif (previous && previous.id !== next.id && previous.attached && this.phase !== \"idle\") {\n\t\t\tawait this.#detach(next);\n\t\t\tthrow new Error(`Cannot ${operation} a session while session is ${this.phase ?? \"unavailable\"}`);\n\t\t}\n\t\tif (previous && previous.id !== next.id && previous.attached) {\n\t\t\ttry {\n\t\t\t\tawait previous.detach();\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tawait this.#detach(next);\n\t\t\t\t} catch (cleanupError) {\n\t\t\t\t\tthrow new AggregateError([error, cleanupError], \"Failed to replace remote session attachment\");\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\tawait this.#assertNotDisposedAfterAwait(next);","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/client/remote-session.ts#L255-L291","documentation":"Error \"Session ${next.id} did not provide a snapshot\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/client/remote-session.ts:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}