Document:

<PAGE>

                                                                   EXHIBIT 10.18

                      SECOND AMENDMENT TO CREDIT AGREEMENT

      THIS SECOND AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is entered
into as of June 7, 2004, by and between CRAY, INC., a Washington corporation
("Borrower"), and WELLS FARGO BANK, NATIONAL ASSOCIATION ("Bank").

                                    RECITALS

      WHEREAS, Borrower is currently indebted to Bank pursuant to the terms and
conditions of that certain Credit Agreement between Borrower and Bank dated as
of April 10, 2003, as amended from time to time ("Credit Agreement").

      WHEREAS, Bank and Borrower have agreed to certain changes in the terms and
conditions set forth in the Credit Agreement and have agreed to amend the Credit
Agreement to reflect said changes.

      NOW, THEREFORE, for valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the parties hereto agree that the Credit
Agreement shall be amended as follows:

      1. Section 1.1 (c) is hereby deleted in its entirety, and the following
substituted therefor:

      "(c) Letter of Credit Subfeature. As a subfeature under the Line of
Credit, Bank agrees from time to time during the term thereof to issue or cause
an affiliate to issue standby letters of credit for the account of Borrower
(each, a "Letter of Credit" and collectively, "Letters of Credit"); provided
however, that the aggregate undrawn amount of all outstanding Letters of Credit
shall not at any time exceed Twenty Million Dollars ($20,000,000.00). The form
and substance of each Letter of Credit shall be subject to approval by Bank, in
its sole discretion. No Letter of Credit shall have an expiration date
subsequent to the maturity date of the Line of Credit. The undrawn amount of all
Letters of Credit shall be reserved under the Line of Credit and shall not be
available for borrowings thereunder. Each Letter of Credit shall be subject to
the additional terms and conditions of the Letter of Credit agreements,
applications and any related documents required by Bank in connection with the
issuance thereof. Each drawing paid under a Letter of Credit shall be deemed an
advance under the Line of Credit and shall be repaid by Borrower in accordance
with the terms and conditions of this Agreement applicable to such advances;
provided however, that if advances under the Line of Credit are not available,
for any reason, at the time any drawing is paid, then Borrower shall immediately
pay to Bank the full amount drawn, together with interest thereon from the date
such drawing is paid to the date such amount is fully repaid by Borrower, at the
rate of interest applicable to advances under the Line of Credit. In such event
Borrower agrees that Bank, in its sole discretion, may debit any account
maintained by Borrower with Bank for the amount of any such drawing."

      2. Section 1.2 (d) is hereby deleted in its entirety, and the following
substituted therefor:

      "(d) Letter of Credit Fees. Borrower shall pay to Bank (i) fees upon the
issuance of each Letter of Credit equal to one percent (1.00%) per annum
(computed on the basis of a 360-day year, actual days elapsed) of the face
amount thereof, and (ii) fees upon the payment or negotiation of each drawing
under any Letter of Credit and fees upon the occurrence of any

                                       -1-
<PAGE>

other activity with respect to any Letter of Credit (including without
limitation, the transfer, amendment or cancellation of any Letter of Credit)
determined in accordance with Bank's standard fees and charges then in effect
for such activity. Fees will be payable quarterly in arrears for each Letter of
Credit issued."

      3. Except as specifically provided herein, all terms and conditions of the
Credit Agreement remain in full force and effect, without waiver or
modification. All terms defined in the Credit Agreement shall have the same
meaning when used in this Amendment. This Amendment and the Credit Agreement
shall be read together, as one document.

      4. Borrower hereby remakes all representations and warranties contained in
the Credit Agreement and reaffirms all covenants set forth therein. Borrower
further certifies that as of the date of this Amendment there exists no Event of
Default as defined in the Credit Agreement, nor any condition, act or event
which with the giving of notice or the passage of time or both would constitute
any such Event of Default.

ORAL AGREEMENTS OR ORAL COMMITMENTS TO LOAN MONEY, EXTEND CREDIT OR TO FORBEAR
ENFORCING REPAYMENT OF A DEBT ARE NOT ENFORCEABLE UNDER WASHINGTON LAW.

      IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
executed as of the day and year first written above.

                                           WELLS FARGO BANK,
CRAY, INC.                                  NATIONAL ASSOCIATION

By: /s/ Scott J. Poteracki                 By: /s/ Russ Carson
    ----------------------                     ----------------------
Title: CFO                                 Russ Carson, Assistant Vice President

                                       -2-<PAGE>

                                                                   EXHIBIT 10.19

                       THIRD AMENDMENT TO CREDIT AGREEMENT

      THIS THIRD AMENDMENT TO CREDIT AGREEMENT (this "Amendment") is entered
into as of November 29, 2004, by and between CRAY INC., a Washington corporation
("Borrower"), and WELLS FARGO BANK, NATIONAL ASSOCIATION ("Bank").

                                    RECITALS

      WHEREAS, Borrower is currently indebted to Bank pursuant to the terms and
conditions of that certain Credit Agreement between Borrower and Bank dated as
of April 10, 2003, as amended from time to time ("Credit Agreement").

      WHEREAS, Bank and Borrower have agreed to certain changes in the terms and
conditions set forth in the Credit Agreement and have agreed to amend the Credit
Agreement to reflect said changes.

      NOW, THEREFORE, for valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, and subject to the conditions set forth in this
Amendment, the parties hereto agree that the Credit Agreement shall be amended
as follows:

      1. Section 1.1(a) is hereby amended to reflect that (a) the last day on
which Bank will make advances under the Line of Credit is December 10, 2004, (b)
the maximum aggregate amount of advances to which Borrower is entitled to under
the Line of Credit after the date of this Amendment is $2,000,000, and (c) all
overdrafts in any of Borrower's accounts with Bank shall constitute advances
under the Line of Credit whether or not such overdrafts occur after the
expiration of the Line of Credit or exceed the maximum amount of advances
described in clause (b). Borrower acknowledges that clause (c) above does not
constitute a commitment of Bank to permit overdrafts in any of Borrower's
accounts with Bank.

      2. Section 1.1(c) is hereby amended to reflect that Bank has no further
commitment to issue additional letters of credit under the letter of credit
subfeature of the Line of Credit other than one letter of credit in the amount
of $927,811 naming Public Procurement Service as the beneficiary. The Borrower's
existing letters of credit and the letter of credit described in the immediately
preceding sentence do not constitute advances for purposes of Section 1(b)
above.

      3. Section 1.2(c) is hereby amended to reflect that effective on the date
of this Amendment, the unused commitment fee provided for therein shall cease to
accrue.

      4. The maturity date of Line of Credit is hereby extended until December
10, 2004. The promissory note dated as of April 10, 2003, executed by Borrower
and payable to the order of Bank which evidences the Line of Credit is hereby
amended to reflect the December 10, 2004 maturity date. All other terms and
conditions of the Note remain in full force and effect, without waiver or
modification.

      5. Borrower acknowledges that Bank has not committed to make any renewal
or further extension of the expiration date or maturity date of the Line of
Credit beyond December 10, 2004, and that any such renewal or further extension
remains in the sole discretion of Bank. This Amendment constitutes the entire
agreement between Bank and Borrower with respect to

<PAGE>

the expiration date and the maturity date extension for the Line of Credit, and
supersedes all prior negotiations, discussions and correspondence concerning
such extension.

      6. There is added to the Credit Agreement the following:

            SECTION 7.12. SUBORDINATED DEBT.

            (a) Borrower has informed Bank that it intends to issue up to
      $80,000,000 of convertible senior subordinated notes (the "Notes").
      Borrower agrees that in the event the Notes are issued by Borrower, the
      Notes shall be issued pursuant to an Indenture in a form that contains
      definitions of the terms "Designated Senior Debt", "Indebtedness", "Senior
      Credit Facility" and "Senior Debt" substantially similar to those
      contained in the draft Indenture sent to the Bank by Latham & Watkins via
      email on November 19, 2004 at 9:46 a.m., Seattle time (the "Draft
      Indenture"), as well as subordination provisions substantially similar to
      the subordination provisions set forth in Article XIII of the Draft
      Indenture.

            (b) Until such time as all obligations of Borrower under the Credit
      Agreement and the Line of Credit are satisfied in full, Borrower will not
      amend or consent to the amendment of the provisions of the Indenture
      described in paragraph (a) above.

            (c) Borrower will not prepay, redeem or defease any of the Notes
      unless there is (i) no outstanding amount under the Line of Credit
      (provided that there can be outstanding Letters of Credit) and (ii) no
      Event of Default under the Credit Agreement.

            (d) Borrower shall not use the Line of Credit as a source of funds
      to prepay, redeem or defease any of the Notes."

      7. The modifications set forth in this Amendment shall not be effective
unless and until Borrower has executed and delivered to Bank this Amendment and
Borrower has paid to Bank a non-refundable fee of $9,000.

      8. In the event that Bank receives and approves, on or before December 10,
2004, from Bear, Stearns & Co. Inc. (or one or more of its affiliates), a
purchase agreement to purchase Notes in the initial aggregate principal amount
of not less than $50,000,000, then the Credit Agreement shall be deemed further
amended by amending Sections 1,4 and 5 of this Amendment to delete all
references in such Sections to the date "December 10, 2004", and to replace such
date with the date "December 15, 2004".

      9. Promptly upon demand by Bank, Borrower shall reimburse Bank for
attorneys' fees incurred by Bank in connection with this Amendment and Bank's
consent to the issuance of the Notes.

      10. Except as specifically provided herein, all terms and conditions of
the Credit Agreement remain in full force and effect, without waiver or
modification. All terms defined in the Credit Agreement shall have the same
meaning when used in this Amendment. This Amendment and the Credit Agreement
shall be read together, as one document.

      11. Borrower hereby remakes all representations and warranties contained
in the Credit Agreement and reaffirms all covenants set forth therein. Borrower
further certifies that as of the date of this Amendment there exists no Event of
Default as defined in the Credit Agreement, nor

<PAGE>

any condition, act or event which with the giving of notice or the passage of
time or both would constitute any such Event of Default, other than financial
covenant defaults that the Bank has previously waived. The Bank confirms that
its existing waivers continue in effect through the maturity date of the Line of
Credit.

ORAL AGREEMENTS OR ORAL COMMITMENTS TO LOAN MONEY, EXTEND CREDIT OR TO FORBEAR
ENFORCING REPAYMENT OF A DEBT ARE NOT ENFORCEABLE UNDER WASHINGTON LAW.

      IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
executed as of the day and year first written above.

                                           WELLS FARGO BANK,
CRAY INC.                                   NATIONAL ASSOCIATION

By: /s/ Kenneth W. Johnson                 By: /s/ Russ Carson
    -------------------------                  ---------------------------
Title: Senior Vice President               Title: AVP / Relationship Mgr

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