{"record":{"id":"8a418d410e95e263","repo":"deepseek-ai/deepseek-harness","slug":"cannot-move-session-sessionid-in-workspace","errorCode":null,"errorMessage":"cannot move session '${sessionId}' in workspace '${record.path}': the session is not accounted","messagePattern":"cannot move session '(.+?)' in workspace '(.+?)': the session is not accounted","errorType":"exception","errorClass":"WorkspaceMoveInvalidError","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/entity.ts","lineNumber":154,"sourceCode":"        )\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)\n    }\n    await this.mutate(record => record.sessionIds.includes(sessionId)\n      ? record\n      : { ...record, sessionIds: [sessionId, ...record.sessionIds] })\n  }\n\n  async insertSessionBefore(sessionId: SessionId, beforeSessionId?: SessionId): Promise<void> {\n    await this.mutate((record) => {\n      if (!record.sessionIds.includes(sessionId)) {\n        throw new WorkspaceMoveInvalidError(\n          `cannot move session '${sessionId}' in workspace '${record.path}': the session is not accounted`,\n        )\n      }\n      if (beforeSessionId !== undefined && !record.sessionIds.includes(beforeSessionId)) {\n        throw new WorkspaceMoveInvalidError(\n          `cannot move session '${sessionId}' before '${beforeSessionId}' in workspace '${record.path}': `\n          + 'the anchor session is not accounted',\n        )\n      }\n      if (beforeSessionId === sessionId) return record\n      const without = record.sessionIds.filter(id => id !== sessionId)\n      const at = beforeSessionId === undefined ? without.length : without.indexOf(beforeSessionId)\n      const sessionIds = [...without.slice(0, at), sessionId, ...without.slice(at)]\n      return sessionIds.every((id, index) => id === record.sessionIds[index])\n        ? record\n        : { ...record, sessionIds }\n    })\n  }","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/entity.ts#L136-L172","documentation":"Error \"cannot move session '${sessionId}' in workspace '${record.path}': the session is not accounted\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/entity.ts:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Attach the session to the workspace before trying to move it within the workspace order."],"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"}