Document:

QuickLinks
 -- Click here to rapidly navigate through this document
  

 
 

Exhibit 10.7    
    

Execution Copy  

 
 

SECOND AMENDMENT
  TO CREDIT AGREEMENT    
    

        This SECOND AMENDMENT, dated as of November 24, 2004 (this "Second Amendment") is entered into by and among
COFFEYVILLE RESOURCES, LLC, a Delaware limited liability company ("Resources"), COFFEYVILLE RESOURCES NITROGEN FERTILIZERS, LLC, a Delaware limited
liability company ("Fertilizers"), COFFEYVILLE RESOURCES REFINING & MARKETING, LLC, a Delaware limited liability company
("Refining"), COFFEYVILLE RESOURCES CRUDE TRANSPORTATION, LLC, a Delaware limited liability company
("Transportation"), and COFFEYVILLE RESOURCES TERMINAL, LLC, a Delaware limited liability company
("Terminal") (Resources, Fertilizers, Refining, Transportation and Terminal are sometimes collectively referred to herein as the
"Borrowers" and individually as a "Borrower"), the other Credit Parties signatory hereto, CONGRESS
FINANCIAL CORPORATION (SOUTHWEST) in its capacity as administrative agent for the Revolver Secured Parties (as defined in the Credit Agreement referred to below) (together with its successors and
assigns, the "Administrative Agent"), CREDIT SUISSE FIRST BOSTON, acting through its Cayman Islands Branch, in its capacity as administrative agent for
the Term Secured Parties (as defined in the Credit Agreement) (together with its successors and assigns, the "Term Agent," and together with the
Administrative Agent, collectively, the "Agents") and the Lenders party thereto. 

        WHEREAS, the Borrowers have entered into that certain Credit Agreement, dated as of May 10, 2004, as amended by the Limited Waiver
and Consent, dated as of September 22, 2004, and the First Amendment, dated as of October 8, 2004, and as further amended, supplemented, restated or otherwise modified from time to time
(the "Credit Agreement"), by and among the Borrowers; the other Credit
Parties party thereto; the Term Agent, as Sole Bookrunner, Sole Lead Arranger, Syndication Agent and Documentation Agent, the Administrative Agent, and the Lenders party thereto from time to time; 

        WHEREAS, the Borrowers have notified the Administrative Agent and Term Agent that the Grantors seek to enter into Hedging Contracts with
Koch Supply and Trading, Hess Energy, BP Products North America, Inc., Conoco Phillips and Sempra that are not provided for in Section 7.3(a)(ix) due to the exclusion of such
entities from the definition of "Eligible Hedge Counterparty"; 

        WHEREAS, the terms used herein, including in the preamble and recitals hereto, not otherwise defined herein or otherwise amended hereby
shall have the meanings ascribed thereto in the Credit Agreement; 

        NOW, THEREFORE, in consideration of the premises and the agreements, provisions and covenants herein contained, the Borrowers, and the
other Credit Parties, the Requisite Lenders and the Agents party hereto agree as follows: 

SECTION 1. AMENDMENT TO CREDIT AGREEMENT  

        1.1   The following definition in the Credit Agreement is hereby amended by deleting the existing definition in its entirety
and substituting the following in its place: 

"Eligible Hedge Counterparty" means each of Morgan Stanley, Goldman Sachs, Deutsche Bank, Phibro, ABN Amro, Koch Supply and Trading, Hess Energy, BP
Products North America, Inc., Conoco Phillips, Sempra (and any of their respective Subsidiaries), the Term 

1

 

Agent,
Administrative Agent, each Lender or any Affiliate of a Lender or the Term Agent counterparty to a Hedging Contract (including any Person who is a Lender (and any Affiliate thereof) as of the
Closing Date but subsequently, after entering into a Hedging Contract, ceases to be a Lender). 

"Hedging Contract" means any agreement, whether or not in writing, relating to any transaction that is a commodity swap, futures contract, commodity
option, cap, collar or floor transaction, any foreign exchange contract, currency swap agreement, interest rate hedging agreement, interest rate swap, cap or collar agreement or any other similar
transaction (including any option to enter into any of the
foregoing) or any combination of the foregoing, and, unless the context otherwise clearly requires, any master agreement relating to or governing any or all of the foregoing. 

        1.2   Section 7.16(b) of the Credit Agreement shall be amended by the addition at the end thereof of the following
proviso: 

";
provided that this Section 7.16(b) shall not prohibit any Credit Party from extending the effective duration on arms length commercial terms and in any event on terms no more onerous to such
Credit Party than the contract or document being extended, the BP long term supply agreement dated March 2, 2004 with Refining or any such similar contract or document relating to ordinary
course supply or customer arrangements (but expressly excluding any contract or document relating to Indebtedness for borrowed money), in each case in the ordinary course of business consistent with
historic practices". 

SECTION 2. CONDITIONS PRECEDENT TO EFFECTIVENESS  

        The provisions set forth in Section 3 hereof shall be effective as of the date (the "Second Amendment Effective
Date") on which each of the following conditions shall have been satisfied (or waived in accordance with Section 12.2 of the Credit Agreement): 

        (a)   The Credit Parties and the Requisite Lenders shall have indicated their consent by the execution and delivery of the
signature pages to the Term Agent. 

        (b)   As of the Second Amendment Effective Date, the representations and warranties contained herein and in the other Loan
Documents shall be true, correct and complete in all material respects on and as of the Second Amendment Effective Date to the same extent as though made on and as of that date, except to the extent
such representations and warranties specifically relate to an earlier date, in which case such representations and warranties shall have been true, correct and complete in all material respects on and
as of such earlier date; 

        (c)   As of the Second Amendment Effective Date, after giving effect to this Second Amendment, no event shall have occurred and
be continuing that would constitute an Event of Default or a Default. 

        (d)   The Borrowers shall have paid all fees, costs and expenses owing to counsel to each of the Agents invoiced to the
Borrowers on or before the date hereof and reimbursable by the Borrowers under the terms of the Credit Agreement. 

SECTION 3. REPRESENTATIONS AND WARRANTIES  

        In order to induce the Agents and Lenders to enter into this Second Amendment, the Credit Parties hereby represent and warrant that after giving effect to this
Second Amendment: 

        (a)   as of the date hereof, after giving effect to this Second Amendment, there exists no Default or Event of Default; 

2

 

        (b)   all representations and warranties contained in the Credit Agreement and the other Loan Documents are true, correct and
complete in all material respects on and as of the date hereof, except to the extent such representations and warranties specifically relate to an earlier date, in which case they were true, correct
and complete in all material respects on and as of such earlier date; 

        (c)   as of the date hereof, the Credit Parties have performed all agreements to be performed on its part as set forth in the
Credit Agreement; 

        (d)   the execution, delivery and performance of this Second Amendment have been duly authorized by all necessary action on the
part of the Credit Parties; the execution, delivery and performance by the Credit Parties of this Second Amendment and the consummation of the transactions contemplated hereby, does not and will not
(i) violate any provision of any law or governmental rule or regulation applicable to any Credit Party, the organizational documents of any Credit Party, or any order, judgment or decree of any
court or other agency of government binding on any Credit Party, (ii) conflict with, result in a breach of or constitute (with due notice or the lapse of time or both) a default under any
contractual obligation of any Credit Party or any of its Subsidiaries, (iii) result in or require the creation or imposition of any Lien upon any of the properties or assets of any Credit Party
or any of its Subsidiaries, or (iv) require the approval of members of any Credit Party or any approval or consent of any Person under any contractual obligation; and 

        (e)   this Second Amendment and each Loan Document has been duly executed and delivered by each Credit Party and is the legally
valid and binding obligation of such Credit Party, enforceable in accordance with its respective terms, except as may be limited by bankruptcy, insolvency, reorganization or moratorium. 

SECTION 4. ACKNOWLEDGMENT AND CONSENT  

        Holdings and certain Subsidiaries of Holdings have (i) guaranteed the Obligations and (ii) created Liens in favor of Lenders on certain Collateral
to secure their obligations under the Credit Agreement and the Collateral Documents subject to the terms and provisions of the Credit Agreement. 

        Each
Credit Party hereby acknowledges that it has reviewed the terms and provisions of the Credit Agreement and this Second Amendment and consents to the amendment of the Credit
Agreement and consents effected pursuant to this Second Amendment. Each Credit Party hereby confirms that each Loan Document to which it is a party or otherwise bound and all Collateral encumbered
thereby will continue to guarantee or secure, as the case may be, in accordance with the Loan Documents the payment and performance of all "Obligations" under each of the Loan Documents, as the case
may be (in each case as such terms are defined in the applicable Loan Document), including without limitation the payment and performance of all such "Obligations" under each of the Loan Documents, as
the case may be, in respect of the Obligations of the Borrowers now or hereafter existing under or in respect of the Credit Agreement. 

        Each
Credit Party acknowledges and agrees that any of the Loan Documents to which it is a party or otherwise bound shall continue in full force and effect and that all of its obligations
thereunder shall be valid and enforceable and shall not be impaired or limited by the execution or effectiveness of this Second Amendment. Each Credit Party represents and warrants that all
representations and warranties made by such Credit Party contained in the Credit Agreement, this Second Amendment and the other Loan Documents to which it is a party or otherwise bound are true and
correct in all material respects on and as of the Second Amendment Effective Date to the same extent as though made on and as of that date, except to the extent such representations and warranties
specifically relate to an earlier date, in which case they were true and correct in all material respects on and as of such earlier date. 

3

 

        Each
Credit Party, the Agents and Requisite Lenders acknowledge and agree, for the avoidance of doubt, that where used in the Mortgages granted to the Term Agent the phrase,
""Obligations" as defined in the Credit Agreement with respect to the Term Loan", shall, at all times, be deemed to include Term Obligations and such phrase in such documents shall be construed
accordingly and Term Obligations for all purposes of the Loan Documents shall include all Obligations owed to the Term Agent. 

        Each
Credit Party acknowledges and agrees that (i) notwithstanding the conditions to effectiveness set forth in this Second Amendment, such Credit Party is not required by the
terms of the Credit Agreement or any other Loan Document to consent to the amendments to the Credit Agreement effected pursuant to this Second Amendment and (ii) nothing in the Credit
Agreement, this Second
Amendment or any other Loan Document shall be deemed to require the consent of such Credit Party to any future amendments to the Credit Agreement. 

SECTION 5. MISCELLANEOUS  

        5.1   This Second Amendment shall be binding upon the parties hereto and their respective successors and assigns and shall
inure to the benefit of the parties hereto and the successors and assigns of Lenders. No Credit Party's rights or obligations hereunder or any interest therein may be assigned or delegated by any
Credit Party without the prior written consent of all Lenders. 

        5.2   In case any provision in or obligation hereunder shall be invalid, illegal or unenforceable in any jurisdiction, the
validity, legality and enforceability of the remaining provisions or obligations, or of such provision or obligation in any other jurisdiction, shall not in any way be affected or impaired thereby. 

        5.3   Except as specifically waived by this Second Amendment, the Credit Agreement and the other Loan Documents shall remain in
full force and effect and are hereby ratified and confirmed. 

        5.4   The execution, delivery and performance of this Second Amendment shall not, except as expressly provided herein,
constitute a waiver of any provision of, or operate as a waiver of any right, power or remedy of any Agent or Lender under, the Credit Agreement or any of the other Loan Documents. 

        5.5   Section headings herein are included herein for convenience of reference only and shall not constitute a part hereof for
any other purpose or be given any substantive effect. 

        5.6   THIS SECOND AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES HEREUNDER SHALL BE GOVERNED BY, AND SHALL BE CONSTRUED AND ENFORCED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.  

        5.7   This Second Amendment may be executed in any number of counterparts, each of which when so executed and delivered shall be deemed an
original,
but all such counterparts together shall constitute but one and the same instrument. As set forth herein, this Second Amendment shall become effective upon the execution of a counterpart hereof by
each of the parties hereto and receipt by the Borrowers and Agents of written or telephonic notification of such execution and authorization of delivery thereof. 

[The
remainder of this page is intentionally left blank.] 

4

        IN WITNESS WHEREOF, this Second Amendment has been duly executed as of the date first written above. 

	 	 	BORROWERS:
	

 	
 	

COFFEYVILLE RESOURCES, LLC

COFFEYVILLE RESOURCES NITROGEN FERTILIZERS, LLC

COFFEYVILLE RESOURCES REFINING & MARKETING, LLC

COFFEYVILLE RESOURCES TERMINAL, LLC

COFFEYVILLE RESOURCES CRUDE TRANSPORTATION, LLC
	

 	
 	

By:	

/s/  JAMES T. RENS      

	 	 	Name:	James T. Rens
	 	 	Title:	CFO
	 	 	 	 
	 	 	 	 
	

 	
 	
OTHER CREDIT PARTIES:
	

 	
 	

COFFEYVILLE PIPELINE, INC.

COFFEYVILLE REFINING & MARKETING, INC.

COFFEYVILLE NITROGEN FERTILIZERS, INC.

COFFEYVILLE CRUDE TRANSPORTATION, INC.

COFFEYVILLE TERMINAL, INC.

COFFEYVILLE GROUP HOLDINGS, LLC

COFFEYVILLE RESOURCES PIPELINE, LLC

COFFEYVILLE RESOURCES MANAGEMENT, INC.

CL JV HOLDINGS, LLC
	

 	
 	

By:	

/s/  JAMES T. RENS      

	 	 	Name:	James T. Rens
	 	 	Title:	CFO

	 	 	CREDIT SUISSE FIRST BOSTON, acting through its Cayman

Islands Branch, as Term Agent and a Lender
	

 	
 	

By:	

/s/  JAMES P. MORAN      

	 	 	Name:	James P. Moran
	 	 	Title:	Director
	    	 	 	 
	    	 	 	 
	    	 	 	 
	 	 	By:	/s/  DENISE L. ALVAREZ      

	 	 	Name:	Denise L. Alvarez
	 	 	Title:	Associate

	 	 	CONGRESS FINANCIAL CORPORATION (SOUTHWEST),

as Administrative Agent and a Lender
	

 	
 	

By:	

/s/ [illegible]
 Duly Authorized Signatory

	 	 	SIEMENS FINANCIAL SERVICES, INC.
	

 	
 	

By:	

/s/  FRANK AMODIO      

	 	 	Name:	Frank Amodio
	 	 	Title:	Vice President—Credit

	 	 	AMALGAMATED BANK
	

 	
 	

By:	

/s/  BRUCE MEREDITH      

	 	 	Name:	Bruce Meredith
	 	 	Title:	Vice President

QuickLinks

Exhibit 10.7

SECOND AMENDMENT TO CREDIT AGREEMENTQuickLinks
 -- Click here to rapidly navigate through this document
  

 
 

Exhibit 10.8    
    

Execution Copy  

 
 

THIRD AMENDMENT
  TO CREDIT AGREEMENT    
    

        This THIRD AMENDMENT, dated as of December 13, 2004 (this "Third Amendment") is entered into by and among
COFFEYVILLE RESOURCES, LLC, a Delaware limited liability company ("Resources"), COFFEYVILLE RESOURCES NITROGEN FERTILIZERS, LLC, a Delaware limited
liability company ("Fertilizers"), COFFEYVILLE RESOURCES REFINING & MARKETING, LLC, a Delaware limited liability company
("Refining"), COFFEYVILLE RESOURCES CRUDE TRANSPORTATION, LLC, a Delaware limited liability company
("Transportation"), and COFFEYVILLE RESOURCES TERMINAL, LLC, a Delaware limited liability company
("Terminal") (Resources, Fertilizers, Refining, Transportation and Terminal are sometimes collectively referred to herein as the
"Borrowers" and individually as a "Borrower"), the other Credit Parties signatory hereto, CONGRESS
FINANCIAL CORPORATION (SOUTHWEST) ("Congress"), in its capacity as administrative agent for the Revolver Secured Parties (as defined in the Credit
Agreement referred to below) (together with its successors and assigns, the "Administrative Agent"), CREDIT SUISSE FIRST BOSTON, acting through its
Cayman Islands Branch ("CSFB"), in its capacity as administrative agent for the Term Secured Parties (as defined in the Credit Agreement) (together with
its successors and assigns, the "Term Agent," and together with the Administrative Agent, collectively, the
"Agents") and the Lenders party thereto. 

        WHEREAS, the Borrowers have entered into that certain Credit Agreement, dated as of May 10, 2004, as amended by the Limited Waiver
and Consent, dated as of September 22, 2004, the First Amendment, dated as of October 8, 2004 and the Second Amendment, dated as of November 24, 2004 and as further amended,
supplemented, restated or otherwise modified from time to time (the "Credit Agreement"), by
and among the Borrowers, the other Credit Parties party thereto, CSFB as the Term Agent, Congress as the Administrative Agent, and the Lenders party thereto from time to time; 

        WHEREAS, the Borrowers have notified the Administrative Agent and Term Agent that (i) pursuant to that certain Supply Agreement,
dated as of March 2, 2004, between BP and Refining, as amended by Amendment Number 1 to Supply Agreement, dated as of April 23, 2004 and by Amendment Number 2 to Supply Agreement, dated
as of November 19, 2004 (as so amended and as further amended in accordance Section 7.16(b) of the Credit Agreement, the "Amended BP Supply
Agreement") regarding, among other things, the supply of crude oil by BP (the "BP Crude Oil"), Refining is required to enter
into a lease agreement with BP Oil Supply Company, regarding the storage of the BP Crude Oil in Tank No. 1105 owned by Refining at the Broome Station Tank Farm, Caney, Kansas (the
"Broome Station Tank Lease") for a term equal to the term of the BP Supply Agreement or such longer period as consented to by the Agents; and
(ii) BP required as a term of the Amended BP Supply Agreement a lender acknowledgment that the Administrative Agent and Term Agent will not contest BP's ownership of the crude oil located in
Tank No. 1105, notwithstanding the fact that title of such crude oil has not yet transferred to the Credit Parties; 

        WHEREAS, the Borrowers have also notified the Administrative Agent and Term Agent that in order to take advantage of certain joint tariff
benefits, Refining may seek to transfer that certain lease, dated May 26, 1995, between Magellan Pipeline Company, LLC and Refining regarding the pipeline between Caney, Kansas and the East
Tank Farm, Montgomery, Kansas (the "Magellan Lease") to Transportation or to a newly created wholly-owned Subsidiary of Resources; 

1

 

        WHEREAS, pursuant to Section 7.8 of the Credit Agreement and Section 5(h) of the Security Agreement, among other
requirements, the Borrowers may not lease to any other Person any of its properties or other assets, or Collateral without the consent of the Required Lenders and may not transfer assets or
Collateral, among Credit Parties without the consent of the Required Lenders; 

        WHEREAS, the Borrowers have also notified the Administrative Agent and Term Agent that they intend to enter into a memorandum of
understanding with certain parties in Trinidad in connection with the potential development of a new nitrogen fertilizer manufacturing facility in Trinidad and, in connection with such memorandum,
have organized two direct subsidiaries of Fertilizers: Coffeyville Resources Trinidad and Tobago, Limited, a Trinidad corporation and Coffeyville Resources Trinidad and Tobago Fertilizers, LLC, a
Delaware limited liability company. 

        WHEREAS, pursuant to Section 7.1 of the Credit Agreement, among other requirements, the Borrowers may not form new Subsidiaries; 

        WHEREAS, the terms used herein, including in the preamble and recitals hereto, not otherwise defined herein or otherwise amended hereby
shall have the meanings ascribed thereto in the Credit Agreement; 

        NOW, THEREFORE, in consideration of the premises and the agreements, provisions and covenants herein contained, the Borrowers, and the
other Credit Parties, the Requisite Lenders and the Agents party hereto agree as follows: 

SECTION 1. AMENDMENT TO CREDIT AGREEMENT 

        1.1   Section 1 of the Credit Agreement is hereby amended by the addition of the following definitions, which shall be
inserted in proper alphabetical order: 

"Amended BP Supply Agreement" means that certain Supply Agreement, dated as of March 2, 2004, between BP and Refining, as amended by Amendment
Number 1 to Supply Agreement, dated as of April 23, 2004 and by Amendment Number 2 to Supply Agreement, dated as of November 19, 2004, as so amended and as further amended in accordance
Section 7.16(b) of the Credit Agreement. 

"BP Crude Oil" means the crude oil supplied to the Credit Parties pursuant to the Amended BP Supply Agreement in respect of which title has not yet
passed to any of the Credit Parties. 

"Broome Station Tank Lease" means that certain lease agreement, in the form dated on or before the date hereof, between BP Oil Supply Company, as lessee
and Refining, as lessor, regarding the storage of crude oil in Tank No. 1105 at the Broome Station Tank Farm, Caney, Kansas, for a term equal to the term of the Amended BP Supply Agreement or
such longer period as consented to by the Agents. 

"CRTT Limited" means Coffeyville Resources Trinidad and Tobago Limited, a Trinidad corporation. 

"CRTT LLC" means Coffeyville Resources Trinidad and Tobago Fertilizers, LLC, a Delaware limited liability company. 

"New Pipeline Subsidiary" means, upon the Agents' acceptance in writing of the New Subsidiary Requirements in respect thereof, the proposed wholly-owned
Subsidiary of Resources formed to hold, and the sole asset of which is, the Magellan Lease and, upon expiry of the Magellan Lease, the Magellan Pipeline. 

"Magellan Lease" means that certain lease, in the form dated May 26, 1995, between Magellan Pipeline Company, LLC and Refining regarding the
pipeline between Caney, Kansas and the East Tank Farm, Montgomery, Kansas. 

2

 

"Magellan Pipeline" means the pipeline between Caney, Kansas and the East Tank Farm, Montgomery, Kansas subject to the Magellan Lease. 

"New Subsidiary Requirements" means delivery of each of the following requirements: (i) the new subsidiary shall have become a Credit Party under
the Credit Agreement, a Guarantor under the Guaranties, a Grantor under the Security Agreement and a Pledgor under the Pledge Agreement by executing and delivering to Administrative Agent and Term
Agent a Counterpart Agreement, in substantially the form of Annex A to the First Amendment; and (ii) the Agents shall have received (A) sufficient copies of each organizational document
executed and delivered by such new subsidiary and, to the extent applicable, certified as of a recent date by the appropriate governmental official, each dated as of a recent date prior to execution
of the Counterpart Agreement (such date, the "Counterpart Agreement Effective Date"); (B) a signature and incumbency certificate of the officers
of such Person executing the Loan Documents to which it is a party; (C) resolutions of the board of directors or similar governing body of such new subsidiary approving and authorizing the
execution, delivery and performance of this Agreement and the other Loan Documents and the Related Transaction Document to which it is a party or by which it or its assets may be bound as of the
Counterpart Agreement Effective Date, certified as of the Counterpart Agreement Effective Date by its secretary or an assistant secretary as being in full force and effect without modification or
amendment; (D) a good standing certificate from the applicable Governmental Authority of new subsidiary's jurisdiction of organization and in each jurisdiction in which it is qualified as a
foreign corporation or other entity to do business, each dated a recent date prior to the Counterpart Agreement Effective Date; (E) originally executed copies of the favorable written opinions
of counsel for such new subsidiary as to matters as are consistent with the matters covered in the opinion with respect to the Credit Parties on the Closing Date and such other opinions as the Agents
may reasonably request, dated as of the Counterpart Agreement Effective Date and otherwise in form and substance reasonably satisfactory to the Agents; (F) evidence satisfactory to the Agents
of such new subsidiary's authorization to file UCC financing statements; (G) the results of a recent search of all effective UCC financing statements made with respect to any personal or mixed
property of such new subsidiary; and (H) any other document reasonably required by either Agent (including, without limitation, Mortgages, landlord's agreements, mortgagee agreements, bailee
letters and collateral assignments of contracts). 

        1.2   The following definitions in the Credit Agreement are hereby amended by deleting the existing definitions in their
entirety and substituting the following in their place: 

"Management Agreement" means that certain Amended and Restated Management Services Agreement dated as of May 10, 2004 by and between Pegasus and
Holdings, as assigned to Resources pursuant to
that certain Assignment and Assumption Agreement dated as of December 13, 2004 and as further amended, modified or supplemented in accordance with the terms hereof. 

"Subsidiary" means, with respect to any Person, (a) any corporation of which an aggregate of more than 50% of the outstanding Stock having
ordinary voting power to elect a majority of the board of directors of such corporation (irrespective of whether, at the time, Stock of any other class or classes of such corporation shall have or
might have voting power by reason of the happening of any contingency) is at the time, directly or indirectly, owned legally or beneficially by such Person or one or more Subsidiaries of such Person,
or with respect to which any such Person has the right to vote or designate the vote of 50% or more of such Stock whether by proxy, agreement, operation of law or otherwise, and (b) any
partnership or limited liability company in which such Person and/or one or more Subsidiaries of such Person shall have an interest (whether in the form of voting or participation in profits or
capital 

3

 

contribution)
of more than 50% or of which any such Person is a general partner or may exercise the powers of a general partner. Unless the context otherwise requires, each reference to a Subsidiary
shall be a reference to a Subsidiary of Holdings; provided that (i) the Leiber Entities shall hereby expressly be deemed not to be Subsidiaries
of Holdings or CLH hereunder and (ii) CRTT Limited shall hereby expressly be deemed not to be Subsidiaries of Holdings or Fertilizers hereunder." 

        Section 7.1
of the Credit Agreement is hereby amended by its deletion in its entirety and substituting the following in its place: 

"7.1    Mergers, Subsidiaries, Etc.    Except for the Leiber Transaction as effected on the First Amendment Effective Date and the
formation of the New Pipeline Subsidiary (if any), CRTT Limited and CRTT LLC, no Credit Party shall directly or indirectly, by operation of law or otherwise, (a) form or acquire any Subsidiary,
or (b) merge with, consolidate with, acquire all or substantially all of the assets or Stock of, or otherwise combine with or acquire, any Person (except that any Credit Party may merge or
consolidate with another Credit Party, provided that if a Borrower is a party to any such merger, a Borrower shall be the survivor of such merger). For
the avoidance of doubt and notwithstanding the foregoing, any of the Leiber Entities may form or acquire additional Subsidiaries the primary businesses of which are related or complementary to
businesses conducted by the Leiber Entities as of the First Amendment Effective Date." 

        1.4   Section 7.8 of the Credit Agreement is hereby amended by adding the following clauses (e) and (f) at
the end thereof: 

        ",
(e) the entering into, and performance of, the Broome Station Tank Lease and (f) the transfer of the Magellan Lease from Refining to Transportation or the New Pipeline
Subsidiary." 

        1.5   The following covenant is hereby added as Section 7.18 of the Credit Agreement: 

"Section 7.18 Commingling of BP Crude Oil.    No Credit Party shall commingle, or allow to be commingled, any BP Crude Oil being
supplied to the Credit Parties with any crude oil owned by the Credit Parties." 

        1.6   The following covenant is hereby added as Section 7.19 of the Credit Agreement: 

"Section 7.19 CRTT Limited and CRTT LLC.    Notwithstanding anything to the contrary herein, the Credit Parties shall not capitalize,
make any investments in, capital contributions, loans or assume any contingent obligations or other liabilities with respect to CRTT Limited or CRTT LLC or permit CRTT Limited or CRTT LLC to have any
assets or liabilities (other than pursuant to the Loan Documents) or conduct any activities other than entering into a memorandum of understanding with respect to the potential development of a
nitrogen fertilizer manufacturing facility in Trinidad." 

        1.7   The Lenders hereby consent to the granting and execution of the acknowledgment requested by BP in connection with the
Amended BP Supply Agreement and Broome Station Tank Lease, in substantially the form attached hereto as Appendix A. 

        1.8   The Lenders hereby consent to the execution of the Assignment and Assumption Agreement dated as of December 13,
2004 by and among Pegasus, Holdings and Resources and the amendment to the Management Agreement effected thereby. 

        1.9   Section 6.9 of the Credit Agreement is hereby amended by adding the following sentence at the end thereof: 

"In
addition, to the extent otherwise permitted hereunder, if any Credit Party acquires ownership of any pipeline, such Credit Party shall first collaterally assign to the Agents, for 

4

 

the
respective benefit of the Lenders, all interests in real property and fixtures (including, without limitation, all interests in real property, associated rights of way and easements) related to
any such pipeline reasonably requested by the Agents." 

SECTION 2. CONDITIONS PRECEDENT TO EFFECTIVENESS  

        The provisions set forth in Section 1 hereof shall be effective as of the date (the "Third Amendment Effective
Date") on which each of the following conditions shall have been satisfied (or waived in accordance with Section 12.2 of the Credit Agreement): 

        (a)   The Credit Parties and the Requisite Lenders shall have indicated their consent by the execution and delivery of the
signature pages to the Term Agent. 

        (b)   As of the Third Amendment Effective Date, after giving effect to this Third Amendment, the representations and warranties
contained herein and in the other Loan Documents shall be true, correct and complete in all material respects on and as of the Third Amendment Effective Date to the same extent as though made on and
as of that date, except to the extent such representations and warranties specifically relate to an earlier date, in which case such representations and warranties shall have been true, correct and
complete in all material respects on and as of such earlier date. 

        (c)   As of the Third Amendment Effective Date, after giving effect to this Third Amendment, no event shall have occurred and
be continuing that would constitute an Event of Default or a Default. 

        (d)   The Borrowers shall have paid all fees, costs and expenses owing to counsel to each of the Agents invoiced to the
Borrowers on or before the date hereof and reimbursable by the Borrowers under the terms of the Credit Agreement. 

        (e)   Fertilizers and CRTT LLC shall have delivered the New Subsidiary Requirements in respect of CRTT LLC to the Agents, in
form and substance reasonably satisfactory to the Agents. 

SECTION 3. REPRESENTATIONS AND WARRANTIES  

        In order to induce the Agents and Lenders to enter into this Third Amendment, the Credit Parties hereby represent and warrant that after giving effect to this
Third Amendment: 

        (a)   as of the date hereof, after giving effect to this Third Amendment, there exists no Default or Event of Default; 

        (b)   as of the date hereof, after giving effect to this Third Amendment, all representations and warranties contained in the
Credit Agreement and the other Loan Documents are true, correct and complete in all material respects on and as of the date hereof, except to the extent such representations and warranties
specifically relate to an earlier date, in which case they were true, correct and complete in all material respects on and as of such earlier date; 

        (c)   as of the date hereof, the Credit Parties have performed all agreements to be performed on its part as set forth in the
Credit Agreement; 

        (d)   the execution, delivery and performance of this Third Amendment have been duly authorized by all necessary action on the
part of the Credit Parties; the execution, delivery and performance by the Credit Parties of this Third Amendment and the consummation of the transactions contemplated hereby, does not and will not
(i) violate any provision of any law or governmental rule or regulation applicable to any Credit Party, the organizational documents of any Credit Party, or any order, judgment or decree of any
court or other agency of government binding on any Credit Party, (ii) conflict with, result in a breach of or constitute (with due notice 

5

 

or
the lapse of time or both) a default under any contractual obligation of any Credit Party or any of its Subsidiaries, (iii) result in or require the creation or imposition of any Lien upon
any of the properties or assets of any Credit Party or any of its Subsidiaries (other than pursuant to the Loan Documents), or (iv) require the approval of members of any Credit Party or any
approval or consent of any Person under any contractual obligation; 

        (e)   this Third Amendment and each Loan Document has been duly executed and delivered by each Credit Party and is the legally
valid and binding obligation of such Credit Party, enforceable in accordance with its respective terms, except as may be limited by bankruptcy, insolvency, reorganization or moratorium; and 

        (f)    none of the BP Crude Oil constitutes Collateral under the Loan Documents and, at the Broome Station Tank Farm, title to
the BP Crude Oil is held by BP. 

SECTION 4. ACKNOWLEDGMENT AND CONSENT  

        Holdings and certain Subsidiaries of Holdings have (i) guaranteed the Obligations and (ii) created Liens in favor of Lenders on certain Collateral
to secure their obligations under the Credit Agreement and the Collateral Documents subject to the terms and provisions of the Credit Agreement. 

        Each
Credit Party hereby acknowledges that it has reviewed the terms and provisions of the Credit Agreement and this Third Amendment and consents to the amendment of the Credit Agreement
and consents effected pursuant to this Third Amendment. Each Credit Party hereby confirms that each Loan Document to which it is a party or otherwise bound and all Collateral encumbered thereby will
continue to guarantee or secure, as the case may be, in accordance with the Loan Documents the payment and performance of all Obligations under each of the Loan Documents, as the case may be (in each
case as such terms are defined in the applicable Loan Document), including without limitation the payment and performance of all such Obligations under each of the Loan Documents, as the case may be,
in respect of the Obligations of the Borrowers now or hereafter existing under or in respect of the Credit Agreement. 

        Each
Credit Party acknowledges and agrees that any of the Loan Documents to which it is a party or otherwise bound shall continue in full force and effect and that all of its obligations
thereunder shall be valid and enforceable and shall not be impaired or limited by the execution or effectiveness of this Third Amendment. Each Credit Party represents and warrants that all
representations and warranties made by such Credit Party contained in the Credit Agreement, this Third Amendment and the other Loan Documents to which it is a party or otherwise bound are true and
correct in all material respects on and as of the Third Amendment Effective Date to the same extent as though made on and as of that date, except to the extent such representations and warranties
specifically relate to an earlier date, in which case they were true and correct in all material respects on and as of such earlier date. 

        Each
Credit Party acknowledges and agrees that (i) notwithstanding the conditions to effectiveness set forth in this Third Amendment, such Credit Party is not required by the
terms of the Credit Agreement or any other Loan Document to consent to the amendments to the Credit Agreement effected pursuant to this Third Amendment and (ii) nothing in the Credit Agreement,
this Third Amendment or any other Loan Document shall be deemed to require the consent of such Credit Party to any future amendments to the Credit Agreement. 

SECTION 5. MISCELLANEOUS  

        5.1   This Third Amendment shall be binding upon the parties hereto and their respective successors and assigns and shall inure
to the benefit of the parties hereto and the successors and assigns of Lenders. No Credit Party's rights or obligations hereunder or any interest therein may be assigned or delegated by any Credit
Party without the prior written consent of all Lenders. 

6

 

        5.2   In case any provision in or obligation hereunder shall be invalid, illegal or unenforceable in any jurisdiction, the
validity, legality and enforceability of the remaining provisions or obligations, or of such provision or obligation in any other jurisdiction, shall not in any way be affected or impaired thereby. 

        5.3   Except as specifically waived by this Third Amendment, the Credit Agreement and the other Loan Documents shall remain in
full force and effect and are hereby ratified and confirmed. 

        5.4   The execution, delivery and performance of this Third Amendment shall not, except as expressly provided herein,
constitute a waiver of any provision of, or operate as a waiver of any right, power or remedy of any Agent or Lender under, the Credit Agreement or any of the other Loan Documents. 

        5.5   Section headings herein are included herein for convenience of reference only and shall not constitute a part hereof for
any other purpose or be given any substantive effect. 

        5.6   THIS THIRD AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES HEREUNDER SHALL BE GOVERNED BY, AND SHALL BE CONSTRUED AND ENFORCED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.  

         5.7   This Third Amendment may be executed in any number of counterparts, each of which when so executed and delivered shall be deemed an
original, but
all such counterparts together shall constitute but one and the same instrument. As set forth herein, this Third Amendment shall become effective upon the execution of a counterpart hereof by each of
the parties hereto and receipt by the Borrowers and Agents of written or telephonic notification of such execution and authorization of delivery thereof. 

        [The
remainder of this page is intentionally left blank.] 

7

        IN WITNESS WHEREOF, this Third Amendment has been duly executed as of the date first written above. 

	 	 	BORROWERS:
	

 	
 	

COFFEYVILLE RESOURCES, LLC

COFFEYVILLE RESOURCES NITROGEN FERTILIZERS, LLC

COFFEYVILLE RESOURCES REFINING & MARKETING, LLC

COFFEYVILLE RESOURCES TERMINAL, LLC

COFFEYVILLE RESOURCES CRUDE TRANSPORTATION, LLC
	

 	
 	

By:	

/s/  PHILIP L. RINALDI      

	 	 	Name:	Philip L. Rinaldi
	 	 	Title:	Chief Executive Officer
	 	 	 	 
	 	 	 	 
	

 	
 	
OTHER CREDIT PARTIES:
	

 	
 	

COFFEYVILLE PIPELINE, INC.

COFFEYVILLE REFINING & MARKETING, INC.

COFFEYVILLE NITROGEN FERTILIZERS, INC.

COFFEYVILLE CRUDE TRANSPORTATION, INC.

COFFEYVILLE TERMINAL, INC.

COFFEYVILLE GROUP HOLDINGS, LLC

COFFEYVILLE RESOURCES PIPELINE, LLC

COFFEYVILLE RESOURCES MANAGEMENT, INC.

CL JV HOLDINGS, LLC

COFFEYVILLE RESOURCES TRINIDAD AND TOBAGO FERTILIZERS, LLC
	

 	
 	

By:	

/s/  PHILIP L. RINALDI      

	 	 	Name:	Philip L. Rinaldi
	 	 	Title:	Chief Executive Officer

	 	 	CREDIT SUISSE FIRST BOSTON, acting through its Cayman Islands Branch, as Term Agent and a Lender
	

 	
 	

By:	

/s/  JAMES MORAN      

	 	 	Name:	James Moran
	 	 	Title:	Director
	    	 	 	 
	    	 	 	 
	    	 	 	 
	 	 	By:	/s/  DENISE ALVAREZ      

	 	 	Name:	Denise Alvarez
	 	 	Title:	Associate

	 	 	CONGRESS FINANCIAL CORPORATION (SOUTHWEST),

as Administrative Agent and a Lender
	

 	
 	

By:	

/s/ [illegible]
 Duly Authorized Signatory

	 	 	SIEMENS FINANCIAL SERVICES, INC.
	

 	
 	

By:	

/s/  CRAIG L. JOHNSON      

	 	 	Name:	Craig W.
	 	 	Title:	VP, Credit and Operations, Risk Management

	 	 	AMALGAMATED BANK
	

 	
 	

By:	

/s/  BRUCE MEREDITH      

	 	 	Name:	Bruce Meredith
	 	 	Title:	Vice President

	 	 	LANDMARK CDO LIMITED

By: Aladdin Capital Management LLC, as Manager
	

 	
 	

By:	

/s/  ANGELA BOZORGMIR      

	 	 	Name:	Angela Bozorgmir
	 	 	Title:	Director
	

 	
 	

LANDMARK II CDO LIMITED

By: Aladdin Capital Management LLC, as Manager
	

 	
 	

By:	

/s/  ANGELA BOZORGMIR      

	 	 	Name:	Angela Bozorgmir
	 	 	Title:	Director
	

 	
 	

LANDMARK III CDO LIMITED

By: Aladdin Capital Management LLC, as Manager
	

 	
 	

By:	

/s/  ANGELA BOZORGMIR      

	 	 	Name:	Angela Bozorgmir
	 	 	Title:	Director
	

 	
 	

LANDMARK IV CDO LIMITED

By: Aladdin Capital Management LLC, as Manager
	

 	
 	

By:	

/s/  ANGELA BOZORGMIR      

	 	 	Name:	Angela Bozorgmir
	 	 	Title:	Director

	 	 	VENTURE CDO 2002, LIMITED

By its investment advisor, MJX Asset Management LLC
	

 	
 	

By:	

/s/ [illegible]

	 	 	Name:	 
	 	 	Title:	 

	 	 	VENTURE II CDO, LIMITED

By its investment advisor, MJX Asset Management LLC
	

 	
 	

By:	

/s/ [illegible]

	 	 	Name:	 
	 	 	Title:	 

	 	 	VENTURE III CDO, LIMITED

By its investment advisor, MJX Asset Management LLC
	

 	
 	

By:	

/s/ [illegible]

	 	 	Name:	 
	 	 	Title:	 

	 	 	VENTURE IV CDO, LIMITED

By its investment advisor, MJX Asset Management LLC
	

 	
 	

By:	

/s/ [illegible]

	 	 	Name:	 
	 	 	Title:	 

	 	 	CSAM FUNDING I
	

 	
 	

By:	

/s/  DAVID H. LEARNER      

	 	 	Name:	David H. Learner
	 	 	Title:	Authorized Signatory

	 	 	CSAM FUNDING IV
	

 	
 	

By:	

/s/  DAVID H. LEARNER      

	 	 	Name:	David H. Learner
	 	 	Title:	Authorized Signatory

	 	 	FIRST DOMINION FUNDING III
	

 	
 	

By:	

/s/  DAVID H. LEARNER      

	 	 	Name:	David H. Learner
	 	 	Title:	Authorized Signatory

	 	 	DEEPHAVEN DISTRESSED OPPORTUNITIES TRADING LTD.
	

 	
 	

By:	

/s/  PETER H. GLERUM      

	 	 	Name:	Peter H. Glerum
	 	 	Title:	Asset Portfolio Manager

	 	 	NATIONWIDE MUTUAL INSURANCE COMPANY
	

 	
 	

By:	

/s/  THOMAS S. LEGETT      

	 	 	Name:	Thomas S. Legett
	 	 	Title:	Associate Vice President, Public Bonds
	

 	
 	

NATIONWIDE MUTUAL FIRE INSURANCE COMPANY
	

 	
 	

By:	

/s/  THOMAS S. LEGETT      

	 	 	Name:	Thomas S. Legett
	 	 	Title:	Associate Vice President, Public Bonds
	

 	
 	

NATIONWIDE LIFE INSURANCE COMPANY
	

 	
 	

By:	

/s/  THOMAS S. LEGETT      

	 	 	Name:	Thomas S. Legett
	 	 	Title:	Associate Vice President, Public Bonds

	 	 	STANFIELD CLO LTD.

By: Stanfield Capital Partners LLC as its Collateral Manager
	

 	
 	

By:	

/s/  CHRISTOPHER E. JANSEN      

	 	 	Name:	Christopher E. Jansen
	 	 	Title:	Managing Partner

	 	 	STANFIELD/RMF TRANSATLANTIC CDO LTD.

By: Stanfield Capital Partners LLC as its Collateral Manager
	

 	
 	

By:	

/s/  CHRISTOPHER E. JANSEN      

	 	 	Name:	Christopher E. Jansen
	 	 	Title:	Managing Partner

	 	 	KC CLO I LIMITED
	

 	
 	

By:	

/s/ [illegible]

	 	 	Name:	 
	 	 	Title:	 

	 	 	CANADIAN IMPERIAL BANK OF COMMERCE
	

 	
 	

By:	

/s/  MARC BERG      

	 	 	Name:	Marc Berg
	 	 	Title:	Authorized Signatory

QuickLinks

Exhibit 10.8

THIRD AMENDMENT TO CREDIT AGREEMENT

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00078-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00078-of-00352.parquet"}]]