<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>377</ContextCount>
  <ElementCount>481</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>129</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>10</UnitCount>
  <MyReports>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statements of Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedStatementsofComprehensiveLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Loss</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Consolidated Statements of Convertible Preferred Stock and Stockholders??? Equity (Deficit)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedStatementsofConvertiblePreferredStockandStockholdersEquityDeficit</Role>
      <ShortName>Consolidated Statements of Convertible Preferred Stock and Stockholders??? Equity (Deficit)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/Business</Role>
      <ShortName>Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Business Combinations and Asset Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitions</Role>
      <ShortName>Business Combinations and Asset Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Joint Venture</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/JointVenture</Role>
      <ShortName>Joint Venture</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Fair Value of Financial Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/FairValueofFinancialAssetsandLiabilities</Role>
      <ShortName>Fair Value of Financial Assets and Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Property and Equipment, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PropertyandEquipmentNet</Role>
      <ShortName>Property and Equipment, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Goodwill and Intangible Assets, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNet</Role>
      <ShortName>Goodwill and Intangible Assets, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Other Current Assets and Accrued Expenses and Other Current Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/OtherCurrentAssetsandAccruedExpensesandOtherCurrentLiabilities</Role>
      <ShortName>Other Current Assets and Accrued Expenses and Other Current Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Preferred Stock and Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PreferredStockandCommonStock</Role>
      <ShortName>Preferred Stock and Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Compass Concierge Receivables and Allowance for Credit Losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLosses</Role>
      <ShortName>Compass Concierge Receivables and Allowance for Credit Losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - Disclosure - Net Loss Per Share Attributable to Compass, Inc.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/NetLossPerShareAttributabletoCompassInc</Role>
      <ShortName>Net Loss Per Share Attributable to Compass, Inc.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Restructuring Activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/RestructuringActivities</Role>
      <ShortName>Restructuring Activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - Disclosure - Schedule II. Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ScheduleIIValuationandQualifyingAccounts</Role>
      <ShortName>Schedule II. Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>0000027 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://compassinc.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>0000028 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>0000029 - Disclosure - Business Combinations and Asset Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitionsTables</Role>
      <ShortName>Business Combinations and Asset Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitions</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>0000030 - Disclosure - Fair Value of Financial Assets and Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/FairValueofFinancialAssetsandLiabilitiesTables</Role>
      <ShortName>Fair Value of Financial Assets and Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/FairValueofFinancialAssetsandLiabilities</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>0000031 - Disclosure - Property and Equipment, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PropertyandEquipmentNetTables</Role>
      <ShortName>Property and Equipment, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/PropertyandEquipmentNet</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>0000032 - Disclosure - Goodwill and Intangible Assets, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNetTables</Role>
      <ShortName>Goodwill and Intangible Assets, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/GoodwillandIntangibleAssetsNet</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>0000033 - Disclosure - Other Current Assets and Accrued Expenses and Other Current Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/OtherCurrentAssetsandAccruedExpensesandOtherCurrentLiabilitiesTables</Role>
      <ShortName>Other Current Assets and Accrued Expenses and Other Current Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/OtherCurrentAssetsandAccruedExpensesandOtherCurrentLiabilities</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>0000034 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/Leases</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>0000035 - Disclosure - Preferred Stock and Common Stock (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PreferredStockandCommonStockTables</Role>
      <ShortName>Preferred Stock and Common Stock (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/PreferredStockandCommonStock</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>0000036 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/StockBasedCompensation</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>0000037 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/IncomeTaxes</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>0000038 - Disclosure - Compass Concierge Receivables and Allowance for Credit Losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLossesTables</Role>
      <ShortName>Compass Concierge Receivables and Allowance for Credit Losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLosses</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>0000039 - Disclosure - Net Loss Per Share Attributable to Compass, Inc. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/NetLossPerShareAttributabletoCompassIncTables</Role>
      <ShortName>Net Loss Per Share Attributable to Compass, Inc. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/NetLossPerShareAttributabletoCompassInc</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>0000040 - Disclosure - Restructuring Activities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/RestructuringActivitiesTables</Role>
      <ShortName>Restructuring Activities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://compassinc.com/role/RestructuringActivities</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>0000041 - Disclosure - Business - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessAdditionalInformationDetail</Role>
      <ShortName>Business - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>0000042 - Disclosure - Summary of Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>0000043 - Disclosure - Summary of Significant Accounting Policies - Summary of Activity of the Allowance For Credit Losses For Accounts Receivable (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPoliciesSummaryofActivityoftheAllowanceForCreditLossesForAccountsReceivableDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Summary of Activity of the Allowance For Credit Losses For Accounts Receivable (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>0000044 - Disclosure - Summary of Significant Accounting Policies - Schedule of Useful Lives of Property and Equipment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/SummaryofSignificantAccountingPoliciesScheduleofUsefulLivesofPropertyandEquipmentDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Schedule of Useful Lives of Property and Equipment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>0000045 - Disclosure - Business Combinations and Asset Acquisitions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitionsAdditionalInformationDetail</Role>
      <ShortName>Business Combinations and Asset Acquisitions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>0000046 - Disclosure - Business Combinations and Asset Acquisitions - Summary of Fair Value of Components of Purchase Consideration (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitionsSummaryofFairValueofComponentsofPurchaseConsiderationDetail</Role>
      <ShortName>Business Combinations and Asset Acquisitions - Summary of Fair Value of Components of Purchase Consideration (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>0000047 - Disclosure - Business Combinations and Asset Acquisitions - Summary of Preliminary Allocation of Purchase Price (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitionsSummaryofPreliminaryAllocationofPurchasePriceDetail</Role>
      <ShortName>Business Combinations and Asset Acquisitions - Summary of Preliminary Allocation of Purchase Price (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>0000048 - Disclosure - Business Combinations and Asset Acquisitions - Summary of Changes in Contingent Consideration Measured at Fair Value on a Recurring Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/BusinessCombinationsandAssetAcquisitionsSummaryofChangesinContingentConsiderationMeasuredatFairValueonaRecurringBasisDetail</Role>
      <ShortName>Business Combinations and Asset Acquisitions - Summary of Changes in Contingent Consideration Measured at Fair Value on a Recurring Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>0000049 - Disclosure - Joint Venture - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/JointVentureAdditionalInformationDetail</Role>
      <ShortName>Joint Venture - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>0000050 - Disclosure - Fair Value of Financial Assets and Liabilities - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/FairValueofFinancialAssetsandLiabilitiesAdditionalInformationDetail</Role>
      <ShortName>Fair Value of Financial Assets and Liabilities - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>0000051 - Disclosure - Fair Value of Financial Assets and Liabilities - Balances of Contingent Consideration (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/FairValueofFinancialAssetsandLiabilitiesBalancesofContingentConsiderationDetail</Role>
      <ShortName>Fair Value of Financial Assets and Liabilities - Balances of Contingent Consideration (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>0000052 - Disclosure - Property and Equipment, Net - Summary of Property Plant and Equipment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PropertyandEquipmentNetSummaryofPropertyPlantandEquipmentDetail</Role>
      <ShortName>Property and Equipment, Net - Summary of Property Plant and Equipment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>0000053 - Disclosure - Property and Equipment, Net - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PropertyandEquipmentNetAdditionalInformationDetail</Role>
      <ShortName>Property and Equipment, Net - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>0000054 - Disclosure - Goodwill and Intangible Assets, Net - Summary of Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNetSummaryofGoodwillDetail</Role>
      <ShortName>Goodwill and Intangible Assets, Net - Summary of Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>0000055 - Disclosure - Goodwill and Intangible Assets, Net - Summary of Carrying Amounts and Accumulated Amortization of Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNetSummaryofCarryingAmountsandAccumulatedAmortizationofIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Intangible Assets, Net - Summary of Carrying Amounts and Accumulated Amortization of Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>0000056 - Disclosure - Goodwill and Intangible Assets, Net - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNetAdditionalInformationDetail</Role>
      <ShortName>Goodwill and Intangible Assets, Net - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>0000057 - Disclosure - Goodwill and Intangible Assets, Net - Summary of Finite Lived Intangible Assets Future Amortization Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/GoodwillandIntangibleAssetsNetSummaryofFiniteLivedIntangibleAssetsFutureAmortizationExpenseDetail</Role>
      <ShortName>Goodwill and Intangible Assets, Net - Summary of Finite Lived Intangible Assets Future Amortization Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>0000058 - Disclosure - Other Current Assets and Accrued Expenses and Other Current Liabilities - Summary of Other Current Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/OtherCurrentAssetsandAccruedExpensesandOtherCurrentLiabilitiesSummaryofOtherCurrentAssetsDetail</Role>
      <ShortName>Other Current Assets and Accrued Expenses and Other Current Liabilities - Summary of Other Current Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>0000059 - Disclosure - Other Current Assets and Accrued Expenses and Other Current Liabilities - Summary of Accrued Expenses and Other Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/OtherCurrentAssetsandAccruedExpensesandOtherCurrentLiabilitiesSummaryofAccruedExpensesandOtherLiabilitiesDetail</Role>
      <ShortName>Other Current Assets and Accrued Expenses and Other Current Liabilities - Summary of Accrued Expenses and Other Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>0000060 - Disclosure - Debt - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/DebtAdditionalInformationDetail</Role>
      <ShortName>Debt - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>0000061 - Disclosure - Leases - Summary of Operating Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesSummaryofOperatingLeasesDetail</Role>
      <ShortName>Leases - Summary of Operating Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>0000062 - Disclosure - Leases - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesAdditionalInformationDetail</Role>
      <ShortName>Leases - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>0000063 - Disclosure - Leases - Summary of Supplemental Cash Flow Information Related To leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesSummaryofSupplementalCashFlowInformationRelatedToleasesDetail</Role>
      <ShortName>Leases - Summary of Supplemental Cash Flow Information Related To leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>0000064 - Disclosure - Leases - Summary of Weighted-average Remaining Lease Term and Discount Rate (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesSummaryofWeightedaverageRemainingLeaseTermandDiscountRateDetail</Role>
      <ShortName>Leases - Summary of Weighted-average Remaining Lease Term and Discount Rate (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>0000065 - Disclosure - Leases - Summary of Operating Lease Liability Maturity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/LeasesSummaryofOperatingLeaseLiabilityMaturityDetail</Role>
      <ShortName>Leases - Summary of Operating Lease Liability Maturity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>0000066 - Disclosure - Commitments and Contingencies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CommitmentsandContingenciesAdditionalInformationDetail</Role>
      <ShortName>Commitments and Contingencies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>0000067 - Disclosure - Preferred Stock and Common Stock - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PreferredStockandCommonStockAdditionalInformationDetail</Role>
      <ShortName>Preferred Stock and Common Stock - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>0000068 - Disclosure - Preferred Stock and Common Stock - Summary of Preferred Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PreferredStockandCommonStockSummaryofPreferredStockDetail</Role>
      <ShortName>Preferred Stock and Common Stock - Summary of Preferred Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>0000069 - Disclosure - Preferred Stock and Common Stock - Schedule of Stock by Class (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/PreferredStockandCommonStockScheduleofStockbyClassDetail</Role>
      <ShortName>Preferred Stock and Common Stock - Schedule of Stock by Class (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>0000070 - Disclosure - Stock-Based Compensation - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationAdditionalInformationDetail</Role>
      <ShortName>Stock-Based Compensation - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>0000071 - Disclosure - Stock-Based Compensation - Valuation Assumptions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationValuationAssumptionsDetail</Role>
      <ShortName>Stock-Based Compensation - Valuation Assumptions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>0000072 - Disclosure - Stock-Based Compensation - Summary of Stock Option Activity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationSummaryofStockOptionActivityDetail</Role>
      <ShortName>Stock-Based Compensation - Summary of Stock Option Activity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>0000073 - Disclosure - Stock-Based Compensation - Summary of Restricted Stock Units Activity (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationSummaryofRestrictedStockUnitsActivityDetail</Role>
      <ShortName>Stock-Based Compensation - Summary of Restricted Stock Units Activity (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>0000074 - Disclosure - Stock-Based Compensation - Share-based Payment Arrangement, Expensed and Capitalized, Amount (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/StockBasedCompensationSharebasedPaymentArrangementExpensedandCapitalizedAmountDetail</Role>
      <ShortName>Stock-Based Compensation - Share-based Payment Arrangement, Expensed and Capitalized, Amount (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>0000075 - Disclosure - Income Taxes - Schedule of Loss Before Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesScheduleofLossBeforeIncomeTaxesDetails</Role>
      <ShortName>Income Taxes - Schedule of Loss Before Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>0000076 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>0000077 - Disclosure - Income Taxes - Schedule of Components of Income Tax Benefit (Provision) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesScheduleofComponentsofIncomeTaxBenefitProvisionDetails</Role>
      <ShortName>Income Taxes - Schedule of Components of Income Tax Benefit (Provision) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>0000078 - Disclosure - Income Taxes - Schedule of Effective Income Tax Rate Differed From the Statutory Federal Income Tax Rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesScheduleofEffectiveIncomeTaxRateDifferedFromtheStatutoryFederalIncomeTaxRateDetails</Role>
      <ShortName>Income Taxes - Schedule of Effective Income Tax Rate Differed From the Statutory Federal Income Tax Rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>0000079 - Disclosure - Income Taxes - Schedule of Components of Net Deferred Taxes Arising from Temporary Differences (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/IncomeTaxesScheduleofComponentsofNetDeferredTaxesArisingfromTemporaryDifferencesDetails</Role>
      <ShortName>Income Taxes - Schedule of Components of Net Deferred Taxes Arising from Temporary Differences (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>0000080 - Disclosure - Compass Concierge Receivables and Allowance for Credit Losses - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLossesAdditionalInformationDetail</Role>
      <ShortName>Compass Concierge Receivables and Allowance for Credit Losses - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>0000081 - Disclosure - Compass Concierge Receivables and Allowance for Credit Losses - Summary of Activity of The ACL For concierge receivables (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLossesSummaryofActivityofTheACLForconciergereceivablesDetail</Role>
      <ShortName>Compass Concierge Receivables and Allowance for Credit Losses - Summary of Activity of The ACL For concierge receivables (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>0000082 - Disclosure - Compass Concierge Receivables and Allowance for Credit Losses - Schedule of Aging Analysis of Concierge Receivables (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/CompassConciergeReceivablesandAllowanceforCreditLossesScheduleofAgingAnalysisofConciergeReceivablesDetail</Role>
      <ShortName>Compass Concierge Receivables and Allowance for Credit Losses - Schedule of Aging Analysis of Concierge Receivables (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>0000083 - Disclosure - Net Loss Per Share Attributable to Compass, Inc. - Schedule of Computation of Basic and Diluted Net Loss Per Share Attributable to Common Stockholders (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/NetLossPerShareAttributabletoCompassIncScheduleofComputationofBasicandDilutedNetLossPerShareAttributabletoCommonStockholdersDetail</Role>
      <ShortName>Net Loss Per Share Attributable to Compass, Inc. - Schedule of Computation of Basic and Diluted Net Loss Per Share Attributable to Common Stockholders (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>0000084 - Disclosure - Net Loss Per Share Attributable to Compass, Inc. - Schedule of Computation of Diluted Net Loss Per Share Attributable to Common Stockholders (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/NetLossPerShareAttributabletoCompassIncScheduleofComputationofDilutedNetLossPerShareAttributabletoCommonStockholdersDetail</Role>
      <ShortName>Net Loss Per Share Attributable to Compass, Inc. - Schedule of Computation of Diluted Net Loss Per Share Attributable to Common Stockholders (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>0000085 - Disclosure - Restructuring Activities - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/RestructuringActivitiesAdditionalInformationDetail</Role>
      <ShortName>Restructuring Activities - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>0000086 - Disclosure - Restructuring Activities - Summary Of Restructuring Costs (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/RestructuringActivitiesSummaryOfRestructuringCostsDetail</Role>
      <ShortName>Restructuring Activities - Summary Of Restructuring Costs (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>0000087 - Disclosure - Schedule II. Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://compassinc.com/role/ScheduleIIValuationandQualifyingAccountsDetails</Role>
      <ShortName>Schedule II. Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://compassinc.com/role/ScheduleIIValuationandQualifyingAccounts</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="comp-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9999.htm</HtmlFileName>
      <LongName>Uncategorized Items - comp-20221231.htm</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/role/uncategorizedFacts</Role>
      <ShortName>Uncategorized Items - comp-20221231.htm</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 1 fact(s) appearing in ix:hidden were eligible for transformation: us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1 -  comp-20221231.htm 4</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-K" original="comp-20221231.htm">comp-20221231.htm</File>
    <File>comp-20221231.xsd</File>
    <File>comp-20221231_cal.xml</File>
    <File>comp-20221231_def.xml</File>
    <File>comp-20221231_lab.xml</File>
    <File>comp-20221231_pre.xml</File>
    <File>comp-20221231xex211.htm</File>
    <File>comp-20221231xex231.htm</File>
    <File>comp-20221231xex311.htm</File>
    <File>comp-20221231xex312.htm</File>
    <File>comp-20221231xex321.htm</File>
    <File>comp-20221231xex322.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>comp-20221231_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2022</BaseTaxonomy>
    <BaseTaxonomy items="1158">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="38">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
