<PAGE>

                                                                    Exhibit 10.4

                   AGREEMENT TO PRESERVE CORPORATE OPPORTUNITY

      This Agreement is dated as of November 15, 2002, and is between Kevin L.
Griffin (the "SECURITYHOLDER") and Ultra Clean Holdings, Inc., a Delaware
corporation (the "PARENT").

      A.    The Securityholder is a securityholder of Ultra Clean Technology
Systems and Service, Inc., a California corporation (the "COMPANY"), and is an
officer of the Company.

      B.    Parent has entered into an Agreement and Plan of Merger dated as of
October 30, 2002 (the "MERGER AGREEMENT"), pursuant to which Parent proposes to
acquire all of the issued and outstanding shares of capital stock of the
Company. This Agreement shall become effective upon the closing of the merger
(the "CLOSING") contemplated by the Merger Agreement, and shall have no force or
effect unless and until such merger is consummated.

      C.    In connection with the Merger, the Securityholder will receive
approximately $400,000 in consideration for his options in the Company and will
become a securityholder of the Parent.

      D.    In light of the Securityholder's sale of his interest in the Company
to the Parent and his purchase of an ownership interest in the Parent,
Securityholder's position with the Company and Securityholder's contributions in
the past to the growth and development of the Company, and for the purpose of
preserving for Parent's benefit the goodwill, proprietary rights and going
concern value of the Company, and to protect Parent's and the Company's business
opportunities, Parent considers this Agreement integral to the transactions
contemplated by the Merger Agreement. Parent and the Securityholder agree that
the Securityholder has a substantial interest in the Company and the restrictive
covenants contained in this Agreement are reasonable and necessary to ensure
that the value of the business being purchased by Parent is not diminished.

      NOW, THEREFORE, for the purposes of inducing Parent to consummate the
transactions contemplated in the Merger Agreement and to preserve the goodwill,
proprietary rights and going concern value of the Company, and to protect
Parent's and the Company's business opportunities, the parties agree as follows:

      1.    In order to protect the confidentiality of the Company's proprietary
information and in recognition of the highly competitive nature of the
industries in which the Company and its affiliates conduct their businesses, and
to protect Parent's and the Company's business opportunities, the Securityholder
agrees the Securityholder will not, during and for the period commencing with
the Closing
<PAGE>
and ending on the date that is two years after the date of the Closing, on his
own account or as an employee, consultant, independent contractor, partner,
owner, officer, director or stockholder, engage in, be connected with, have any
interest in, or aid or assist anyone else to engage in, be connected with, or
have any interest in, any firm or person which directly competes with a line or
lines of business which the Company (or any of their Subsidiaries) was engaged
in or sought to be engaged in during such period; provided that Executive may
purchase securities in any corporation whose securities are listed or traded on
a national securities exchange or in an over-the-counter securities market if
such purchases do not result in Executive beneficially owning, directly or
indirectly, at any time 1% or more of the equity securities of any such
corporation.

      It is expressly understood and agreed that although the Securityholder and
Parent consider the restrictions contained in this Section 1 to be reasonable
for the purpose of preserving the goodwill, proprietary rights and going concern
value of the Company and its affiliates, and to protect Parent's and the
Company's business opportunities, if a final judicial determination is made by a
court of competent jurisdiction that the time or territory or any other
restriction contained in this Section 1 is an unenforceable restriction on the
activities of the Securityholder, the provisions of this Section 1 shall not be
rendered void but shall be deemed amended to apply as to such maximum time and
territory and to such other extent as such court may judicially determine or
indicate to be reasonable. Alternatively, if the court referred to above finds
that any restriction contained in this Section 1 or any remedy provided in
Section 2 of this Agreement is unenforceable, and such restriction or remedy
cannot be amended so as to make it enforceable, such finding shall not affect
the enforceability of any of the other restrictions contained therein or the
availability of any other remedy. The provisions of this Section 1 shall in no
respect limit or otherwise affect the obligations of the Securityholder under
other agreements with Parent or the Company.

      2.    The Securityholder acknowledges and agrees that Parent's remedy at
law for a breach or threatened breach of any of the provisions of Section 1 of
this Agreement would be inadequate and, in recognition of this fact, in the
event of a breach or threatened breach by the Securityholder of any of the
provisions of Section 1 of this Agreement, the Securityholder agrees that, in
addition to its remedy at law, then at Parent's option, all amounts then or
thereafter due the Securityholder from Parent, the Company and any of its
respective subsidiaries and other affiliates may be withheld to the extent
permitted by law, and Parent, without posting any bond, shall also be entitled
to seek equitable relief in the form of specific performance, temporary
restraining order, temporary or permanent injunction or any other equitable
remedy which may then be available. Nothing herein contained shall be construed
as prohibiting Parent from pursuing, in


                                       2
<PAGE>
addition, any other remedies available to it for such breach or threatened
breach. The waiver by Parent of a breach of any provision of this Agreement by
the Securityholder shall not operate or be construed as a waiver of a breach of
any other provision of this Agreement or of any subsequent breach by the
Securityholder.

      3.    All notices under this Agreement shall be in writing and shall be
effective at the earlier of the date: (a) when delivered in person at the
address of the other party as set forth below, or (b) received by the U.S. Mail,
after being sent, postage prepaid, by registered or certified mail, return
receipt requested, and addressed to the other party as set forth below.

      All notices to the Parent shall be addressed to:

            Dipanjan Deb
            Francisco Partners
            2882 Sand Hill Road, Suite 280
            Menlo Park, CA  94025
            Fax:  650-233-2999

      All notices to the Securityholder shall be sent to Securityholder's last
known address as reflected on the books and records of the Company:

      Such addresses may be changed by notice given in accordance with this
Section.

      4.    The Agreement shall be governed by the laws of the State of Delaware
without regard to its conflict of laws principles. The parties agree that any
action or proceeding with respect to this Agreement shall be brought in state or
federal court residing in the State of Delaware, and the parties agree to the
jurisdiction thereof. The parties hereby irrevocably waive any objection they
may now or hereafter have to the laying of venue of any such action in the said
court(s), and further irrevocably waive any claim they may now or hereafter have
that any such action brought in said court(s) has been brought in an
inconvenient forum.

      5.    Upon effectiveness, this Agreement shall supersede and replace any
other prior agreement or understanding between the Securityholder and Parent, or
its affiliates, predecessors, successors or assigns with respect to the subject
matter hereof. This Agreement may not be modified, altered or changed except
upon the express written consent of both parties. This Agreement shall inure to
the benefit of and be binding upon Parent and the Company, their successors and
assigns, including, without limitation, any corporation which may acquire all or
substantially all of Parent's or the Company's assets or stock or with


                                       3
<PAGE>
or into which Parent or the Company may be consolidated or merged, and upon the
Securityholder and the Securityholder's heirs, executors, administrators and
legal representatives. The Securityholder acknowledges that she has not relied
on any representations, promises, or agreements of any kind made to her in
connection with her decision to sign this Agreement, except for those set forth
in this Agreement. The parties understand and agree that Paragraph headings in
this Agreement are used for convenience or reference only and shall not affect
the meaning of any provision of this Agreement.



                                       4
<PAGE>
      IN WITNESS WHEREOF, the parties have executed this Agreement as of the
date first above written.

                                            ULTRA CLEAN HOLDINGS, INC.


                                            By:
                                               ----------------------
                                               Name:
                                               Title:


                                            SECURITYHOLDER:



                                            ----------------------
                                            Kevin L. Griffin




                                       5