<PAGE>

                                                                   Exhibit 10.23

                                 NEW FOCUS, INC.
                                 ---------------
                             COMPENSATION AGREEMENT
                             ----------------------

     This Compensation Agreement (the "Agreement") is entered into effective as
of December 20, 2001 (the "Effective Date"), by and between New Focus, Inc.
(the "Company"), and Peter Hansen (the "Employee").

     WHEREAS, Employee has been employed with the Company for almost two years
and has demonstrated continued loyalty and dedication to the Company.

     WHEREAS, in recognition and appreciation of Employee's continuing service,
Company desires to raise Employee's base salary and grant Employee a bonus
subject to Employee's continued employment with the Company.

     NOW THEREFORE, the parties hereto agree as follows:

     1.   Base Salary. The Company shall raise Employee's base salary to
          -----------
$210,000 per year, effective January 1, 2002 less applicable withholding.

     2.   Living Expenses. For as long as Employee remains an employee of the
          ---------------
Company and his principal residence is located outside the state of California
the Company shall pay Employee a monthly amount such that the net amount after
applicable tax withholding shallbe $5,000. For purposes of this paragraph, the
applicable tax withholding rates shall be based on Employee's estimated personal
income tax rates as supplied by Employee's accountant and verified by the
Company. At the Company's option, the Company may request a reconciliation
between the Employee's estimated tax rates and his actual tax rates for a given
calendar year. Any adjustments resulting shall be determined by mutual agreement
of the parties.

     3.   Bonus.  The Company shall pay Employee a one-time retention bonus of
          -----
$540,000, subject to applicable withholding, payable in three equal installments
of $180,000 each, subject to Employee's continued employment with the Company on
such dates (the "Bonus"). The first installment shall be paid on December 31,
2001, the second installment shall be paid on March 29, 2002, and the third
installment shall be paid on January 18, 2003, (or such other dates that
correspond with the Company's normal payroll schedule for such months) provided
Employee is employed with the Company on those dates.

     4.   Involuntary Termination. Notwithstanding the requirement in paragraph
          -----------------------
3 above that Employee continue to be employed with the Company on the scheduled
Bonus payment dates, in the event Employee experiences an Involuntary
Termination without Cause prior to January 19, 2003, the remaining unpaid Bonus
installments shall continued to be paid to Employee in accordance with the
payment schedule set forth in paragraph 3 above.

                                       1

<PAGE>

     For purposes of this paragraph 4, the following definitions shall apply:

     "Cause" shall mean (i) any act of personal dishonesty taken by the Employee
     in connection with his responsibilities as an Employee; (ii) conviction of
     a felony that is injurious to the Company, and (iii) a willful act by the
     Employee that constitutes gross misconduct and which is injurious to the
     Company.

     "Involuntary Termination" shall mean (i) without the Employee's express
     written consent, the significant reduction of Employee's duties or
     responsibilities relative to his duties or responsibilities in effect as of
     January 1, 2002 (the "Applicable Date"); (ii) without the Employee's
     express written consent, a significant reduction of the facilities and
     perquisites (including office space and location) available to the Employee
     as of the Applicable Date, except in connection with a reduction of the
     facilities and perquisites available to all other members of the senior
     management staff, other than the Company's Chief Executive Officer; (iii)
     without the Employee's express written consent, a reduction by the Company
     in the base salary of the Employee as in effect as of the Applicable Date,
     or the ineligibility of the Employee to continue to participate in any
     long-term incentive plan of the Company, except in connection with a salary
     reduction program affecting all other members of the senior management
     staff, other than the Company's Chief Executive Officer; (iv) a material
     reduction by the Company in the kind or level of employee benefits to which
     the Employee is entitled as of the Applicable Date with the result that the
     Employee's overall benefits package is significantly reduced; (v) the
     relocation of the Employee to a facility other than the Company's
     headquarters or in the event of an acquisition of the Company, the
     relocation of the Employee to a location more than 50 miles from the
     Employee's then present location, without the Employee's express written
     consent; (vi) any actual or purported termination of the Employee by the
     Company or any successors which is not effected for death or Cause; or
     (vii) the failure of the Company to obtain the assumption of this Agreement
     by any successors.

     5.   At-Will Employment.  The Company and Employee agree that Employee's
          ------------------
employment with the Company is and shall continue to be "at-will" and may be
terminated at any time with or without cause or notice by either the Company or
Employee. No provision of this Agreement (including Sections 1, 2, 3 and 4
hereof) shall be construed as conferring upon Employee a right to continue as an
employee of the Company.

     6.   Arbitration.  The parties agree that any and all disputes arising out
          -----------
of the terms of this Agreement, and their interpretation shall be subject to
binding arbitration in Santa Clara County before the American Arbitration
Association under its National Rules for the Resolution of Employment Disputes
or the California Code of Civil Procedure. Prior to initiating arbitration, the
parties agree to mediate any dispute. The parties agree that the prevailing
party in any arbitration shall be entitled to injunctive relief in any court of
competent jurisdiction to enforce the arbitration award. The parties agree that
the prevailing party in any arbitration shall be awarded its reasonable
attorneys' fees and costs. The parties hereby agree to waive their right to have
any dispute between them resolved in a court of law by a judge or jury. This
section will not prevent either party from seeking injunctive relief (or any

                                       2

<PAGE>

other provisional remedy) from any court having jurisdiction over the parties
and the subject matter of their dispute relating to Employee's obligations under
this Agreement.

     7.   Representations.  Employee represents that he has had the opportunity
          ---------------
to consult with an attorney and a tax advisor regarding the consequences of this
Agreement, including the federal, state and local tax consequences, and has
carefully read and understands the scope and effect of the provisions of this
Agreement. Employee is relying solely on such advisors and not on any statements
or representations of the Company or any of its agents which are not
specifically set forth in this Agreement. Employee understands that Employee
(and not the Company) shall be responsible for Employee's own tax liability that
may arise as a result of the Bonus or the transactions contemplated by this
Agreement.

     8.   Severability. In the event that any provision hereof becomes or is
          ------------
declared by a court of competent jurisdiction to be illegal, unenforceable or
void, this Agreement shall continue in full force and effect without said
provision.

     9.   Entire Agreement. This Agreement represents the entire agreement and
          ----------------
understanding between the Company and Employee with regards to Employee's base
compensation, living expenses and payment of the Bonus, and supersedes and
replaces any and all prior agreements and understandings concerning his
compensation. Neither the Company nor Employee shall be liable nor bound to the
other in any manner by any representations, warranties, or covenants regarding
this subject matter except as specifically set forth herein.

     10.  No Admission of Liability.  Employee understands and acknowledges that
          -------------------------
this Agreement constitutes a compromise and settlement of any and all potential
disputed claims. No action taken by the Company hereto, either previously or in
connection with this Agreement, shall be deemed or construed to be: (a) an
admission of the truth or falsity of any potential claims; or (b) an
acknowledgment or admission by the Company of any fault or liability whatsoever
to Employee or to any third party.

     11.  No Cooperation. Employee agrees that he will not act in any manner
          --------------
that might damage the business of the Company. Employee agrees he will not
encourage, advise, or assist any agency, attorneys or their clients in the
presentation or prosecution of any disputes, differences, lawsuits, grievances,
claims, charges, or complaints against the Company, unless under a subpoena or
other court order to do so. Employee agrees both to immediately notify the
Company in writing upon receipt of any such subpoena or court order, and to
furnish, within three (3) business days of its receipt, a copy of such subpoena
or court order to the Company. If approached by anyone for counsel or assistance
in the presentation or prosecution of any disputes, differences, grievances,
claims, charges, or complaints against the Company, Employee shall state no more
than that he cannot provide counsel or assistance. The parties agree that
Employee's initiation and/or prosecution of any claims or disputes against the
Company that Employee has not otherwise released shall not constitute a
violation of this paragraph.

     12.  Assignment. This Agreement and all rights under this Agreement shall
          ----------
be binding upon, inure to the benefit of, and be enforceable by the parties
hereto and their respective personal or legal

                                       3

<PAGE>

representatives, executors, administrators, heirs, distributees, devisees,
legatees, successors and assigns. This Agreement is personal in nature, and
neither of the parties to this Agreement shall, without the written consent of
the other, assign or transfer this Agreement or any right or obligation under
this Agreement to any other person or entity.

     13.  No Oral Modification. This Agreement may only be amended in writing
          --------------------
signed by the parties hereto.

     14.  Governing Law. This Agreement shall be construed, interpreted governed
          -------------
and enforced in accordance with the laws of the State of California, without
regard to the choice of law principles.

     15.  Counterparts. This Agreement may be executed in counterparts, and each
          ------------
counterpart shall have the same force and effect as an original and shall
constitute an effective, binding agreement on the part of each of the
undersigned.

     16.  Voluntary Execution of Agreement. This Agreement is executed
          --------------------------------
voluntarily and without any duress or undue influence on the part or behalf of
the parties hereto. The parties acknowledge that:

             (a)  they have read this Agreement;

             (b)  they have been represented in the preparation, negotiation,
and execution of this Agreement by legal counsel of their own choice or that
they have voluntarily declined to seek such counsel;

             (c)  they understand the terms and consequences of this Agreement;
and

             (d)  they are fully aware of the legal and binding effect of this
Agreement.

     IN WITNESS WHEREOF, each of the parties has executed this Agreement as of
the day and year first above written.

EMPLOYEE                                        NEW FOCUS, INC.


/s/ Peter Hansen                                /s/ William L. Potts, Jr.
----------------------------                    --------------------------------
Peter Hansen                                    William L. Potts, Jr.
                                                Chief Financial Officer

                                       4