<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.23.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>464</ContextCount>
  <ElementCount>223</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>70</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Statement - Consolidated Statements of Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedStatementsofAssetsandLiabilities</Role>
      <ShortName>Consolidated Statements of Assets and Liabilities</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Statements of Assets and Liabilities (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedStatementsofAssetsandLiabilitiesParenthetical</Role>
      <ShortName>Consolidated Statements of Assets and Liabilities (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statements of Changes in Net Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedStatementsofChangesinNetAssets</Role>
      <ShortName>Consolidated Statements of Changes in Net Assets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statement of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedStatementofCashFlows</Role>
      <ShortName>Consolidated Statement of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Disclosure - Consolidated Schedule of Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedScheduleofInvestments</Role>
      <ShortName>Consolidated Schedule of Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Disclosure - Consolidated Schedule of Investments (Footnotes)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedScheduleofInvestmentsFootnotes</Role>
      <ShortName>Consolidated Schedule of Investments (Footnotes)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Consolidated Schedule of Investments (Additional Information)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedScheduleofInvestmentsAdditionalInformation</Role>
      <ShortName>Consolidated Schedule of Investments (Additional Information)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/Organization</Role>
      <ShortName>Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/SignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Fees, Expenses, Agreements and Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FeesExpensesAgreementsandRelatedPartyTransactions</Role>
      <ShortName>Fees, Expenses, Agreements and Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/Investments</Role>
      <ShortName>Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Fair Value of Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FairValueofInvestments</Role>
      <ShortName>Fair Value of Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Derivatives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/Derivatives</Role>
      <ShortName>Derivatives</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Net Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/NetAssets</Role>
      <ShortName>Net Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Consolidated Financial Highlights</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedFinancialHighlights</Role>
      <ShortName>Consolidated Financial Highlights</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9954701 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/SignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9954702 - Disclosure - Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/InvestmentsTables</Role>
      <ShortName>Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/Investments</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9954703 - Disclosure - Fair Value of Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FairValueofInvestmentsTables</Role>
      <ShortName>Fair Value of Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/FairValueofInvestments</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9954704 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/Debt</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954705 - Disclosure - Derivatives (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DerivativesTables</Role>
      <ShortName>Derivatives (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/Derivatives</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954706 - Disclosure - Commitment and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/CommitmentandContingenciesTables</Role>
      <ShortName>Commitment and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954707 - Disclosure - Net Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/NetAssetsTables</Role>
      <ShortName>Net Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/NetAssets</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954708 - Disclosure - Consolidated Financial Highlights (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedFinancialHighlightsTables</Role>
      <ShortName>Consolidated Financial Highlights (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/ConsolidatedFinancialHighlights</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954709 - Disclosure - Organization (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/OrganizationDetails</Role>
      <ShortName>Organization (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/Organization</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954710 - Disclosure - Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/SignificantAccountingPoliciesDetails</Role>
      <ShortName>Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/SignificantAccountingPoliciesPolicies</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954711 - Disclosure - Fees, Expenses, Agreements and Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FeesExpensesAgreementsandRelatedPartyTransactionsDetails</Role>
      <ShortName>Fees, Expenses, Agreements and Related Party Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/FeesExpensesAgreementsandRelatedPartyTransactions</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954712 - Disclosure - Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/InvestmentsDetails</Role>
      <ShortName>Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/InvestmentsTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954713 - Disclosure - Fair Value of Investments - Schedule of Fair Value Hierarchy of Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FairValueofInvestmentsScheduleofFairValueHierarchyofInvestmentsDetails</Role>
      <ShortName>Fair Value of Investments - Schedule of Fair Value Hierarchy of Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954714 - Disclosure - Fair Value of Investments - Schedule of Fair Value of Financial Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FairValueofInvestmentsScheduleofFairValueofFinancialInvestmentsDetails</Role>
      <ShortName>Fair Value of Investments - Schedule of Fair Value of Financial Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954715 - Disclosure - Fair Value of Investments - Schedule of Significant Unobservable Inputs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/FairValueofInvestmentsScheduleofSignificantUnobservableInputsDetails</Role>
      <ShortName>Fair Value of Investments - Schedule of Significant Unobservable Inputs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954716 - Disclosure - Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DebtNarrativeDetails</Role>
      <ShortName>Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954717 - Disclosure - Debt - Schedule of Outstanding Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DebtScheduleofOutstandingBorrowingsDetails</Role>
      <ShortName>Debt - Schedule of Outstanding Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954718 - Disclosure - Debt - Schedule of Contractual Maturities of Debt Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DebtScheduleofContractualMaturitiesofDebtObligationsDetails</Role>
      <ShortName>Debt - Schedule of Contractual Maturities of Debt Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954719 - Disclosure - Debt - Schedule of Credit Facility Components of Interest Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DebtScheduleofCreditFacilityComponentsofInterestExpenseDetails</Role>
      <ShortName>Debt - Schedule of Credit Facility Components of Interest Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954720 - Disclosure - Derivatives - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DerivativesNarrativeDetails</Role>
      <ShortName>Derivatives - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954721 - Disclosure - Derivatives - Schedule of Derivative Instruments Eligible for Offset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DerivativesScheduleofDerivativeInstrumentsEligibleforOffsetDetails</Role>
      <ShortName>Derivatives - Schedule of Derivative Instruments Eligible for Offset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954722 - Disclosure - Derivatives - Schedule of Derivative Instruments Gains (Losses) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/DerivativesScheduleofDerivativeInstrumentsGainsLossesDetails</Role>
      <ShortName>Derivatives - Schedule of Derivative Instruments Gains (Losses) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954723 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/CommitmentsandContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/CommitmentsandContingencies</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954724 - Disclosure - Net Assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/NetAssetsNarrativeDetails</Role>
      <ShortName>Net Assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954725 - Disclosure - Net Assets - Schedule of Capital Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/NetAssetsScheduleofCapitalActivityDetails</Role>
      <ShortName>Net Assets - Schedule of Capital Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954726 - Disclosure - Net Assets - Schedule of Shares Issued and Proceeds Related to Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/NetAssetsScheduleofSharesIssuedandProceedsRelatedtoActivityDetails</Role>
      <ShortName>Net Assets - Schedule of Shares Issued and Proceeds Related to Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954727 - Disclosure - Consolidated Financial Highlights (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/ConsolidatedFinancialHighlightsDetails</Role>
      <ShortName>Consolidated Financial Highlights (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/ConsolidatedFinancialHighlightsTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="oha-20230630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954728 - Disclosure - Subsequent Events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.oakhilladvisors.com/role/SubsequentEventsDetails</Role>
      <ShortName>Subsequent Events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.oakhilladvisors.com/role/SubsequentEvents</ParentRole>
      <Position>50</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">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -10000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-196, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-197, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-69, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -5000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-70, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -18000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-198, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -20000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-199, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -9000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-200, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -22000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-201, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -60000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-202, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-74, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -2000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-75, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -89000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-203, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -108000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-204, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -18000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-205, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -34000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-207, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -27000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-103, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-104, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -2000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-208, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -19000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-127, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -38000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-128, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -19000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-37, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -6000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-38, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -5000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-210, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -26000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-211, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -28000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-212, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -45000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-88, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -36000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-89, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -144000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-7, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -72000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-8, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -23000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-213, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -10000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-91, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -2000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-92, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -43000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-214, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -9000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-14, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -28000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-117, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -12000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-118, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -22000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-215, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -11000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-216, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -29000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-217, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -6000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-218, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -9000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-219, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -27000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-51, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -22000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-52, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -1131000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-3, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -9000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-242, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-301, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-253, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-254, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -17000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-302, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -5000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-256, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-257, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -31000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-303, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -6000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-259, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -6000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-260, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -15000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-223, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -8000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-224, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -4000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-262, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -13000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-263, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-288, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-307, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -6000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-247, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -2000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-308, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -25000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-309, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
    <Log type="Warning">[dqc-0015-Negative-Values] Fact us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount has a value of -3000 which is less than zero. This element should not have a negative value. The preparer should consider if the value is input correctly for this assertion and, after considering the appropriateness of the input, if incorrect, input the amount as a positive (i.e., absolute) value and provide a negated label. The properties of this us-gaap:InvestmentCompanyFinancialSupportToInvesteeContractuallyRequiredAmount fact are: Context: c-238, Unit: usd, Rule Element Id: 6953. oha-20230630.htm 4</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-Q" original="oha-20230630.htm">oha-20230630.htm</File>
    <File>exhibit1010_amendedandre.htm</File>
    <File>exhibit102_investmentadv.htm</File>
    <File>exhibit103_administratio.htm</File>
    <File>exhibit108_multipleclass.htm</File>
    <File>exhibit109_seniorsecured.htm</File>
    <File>exhibit311_ocreditceosec30.htm</File>
    <File>exhibit312_ocreditcfosec30.htm</File>
    <File>exhibit321_ocreditceosec90.htm</File>
    <File>exhibit322_ocreditcfosec90.htm</File>
    <File>oha-20230630.xsd</File>
    <File>oha-20230630_cal.xml</File>
    <File>oha-20230630_def.xml</File>
    <File>oha-20230630_lab.xml</File>
    <File>oha-20230630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="2081">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="28">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
