{"record":{"id":"1ce8f3e9cd7d79df","repo":"deepseek-ai/deepseek-harness","slug":"cannot-attach-session-sessionid-to-workspace-1ce8f3","errorCode":null,"errorMessage":"cannot attach session '${sessionId}' to workspace '${this.record.path}': its cwd '${header.cwd}' does not resolve, so it cannot be validated","messagePattern":"cannot attach session '(.+?)' to workspace '(.+?)': its cwd '(.+?)' does not resolve, so it cannot be validated","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/entity.ts","lineNumber":126,"sourceCode":"\n  async attachSession(sessionId: SessionId): Promise<void> {\n    // Validation is skipped when the settled snapshot already accounts the\n    // id: the cwd fact was checked when it first attached and both inputs\n    // (stored header cwd, workspace path) are immutable. Membership itself is\n    // decided on the write chain inside `mutate`, never on this snapshot.\n    if (!this.record.sessionIds.includes(sessionId)) {\n      const header = await this.host.readSessionHeader(sessionId)\n      if (header.cwd === undefined) {\n        throw new Error(\n          `cannot attach session '${sessionId}' to workspace '${this.record.path}': `\n          + 'its stored header carries no cwd to validate against',\n        )\n      }\n      let cwd: string\n      try {\n        cwd = await realpathNormalize(header.cwd)\n      } catch (error) {\n        throw new Error(\n          `cannot attach session '${sessionId}' to workspace '${this.record.path}': `\n          + `its cwd '${header.cwd}' does not resolve, so it cannot be validated`,\n          { cause: error },\n        )\n      }\n      if (!(await stat(cwd)).isDirectory()) {\n        throw new Error(\n          `cannot attach session '${sessionId}' to workspace '${this.record.path}': `\n          + `its cwd '${header.cwd}' is not a directory`,\n        )\n      }\n      if (cwd !== this.record.path) {\n        throw new Error(\n          `cannot attach session '${sessionId}' to workspace '${this.record.path}': `\n          + `its cwd resolves to '${cwd}'`,\n        )\n      }\n      this.host.rememberSessionPath(sessionId, cwd)","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/entity.ts#L108-L144","documentation":"Error \"cannot attach session '${sessionId}' to workspace '${this.record.path}': its cwd '${header.cwd}' does not resolve, so it cannot be validated\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/entity.ts:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the session's stored cwd so it resolves (correct the path or remove dangling symlinks) before attaching."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}