<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-