<PAGE>
                                                                  EXHIBIT 10.12


                              SEPARATION AGREEMENT

                  This SEPARATION AGREEMENT is dated as of July 16, 2003, and is
entered into by and between Idenix (Massachusetts) Inc., a Massachusetts
corporation (formerly Novirio Pharmaceuticals, Inc.) (the "Company"), and John
P. Dunphy ("Executive").

                  WHEREAS, Executive and the Company are parties to a letter
agreement, dated January 11, 2002 (the "Employment Agreement"), pursuant to
which Executive serves as Chief Financial Officer of the Company; and

                  WHEREAS, in connection with the closing of the transactions
contemplated under that certain Stock Purchase Agreement dated as of March 21,
2003 by and among Novartis Pharma AG, the Company, and certain stockholders of
the Company (the "Purchase Agreement"), the Company underwent a Change in
Control (as defined in the Employment Agreement); and

                  WHEREAS, in accordance with the terms of the Employment
Agreement, following such Change of Control, Executive has tendered his
resignation, which shall be effective as of July 31, 2003 (the "Termination
Date"); and

                  WHEREAS, subject to the terms and conditions contained herein,
Executive and the Company have mutually agreed to embody in this Agreement the
terms and conditions applicable to Executive's resignation of employment with
the Company.

                  NOW, THEREFORE, the parties hereby agree:

         Section 1.        Termination Date. Executive's resignation of
employment with the Company shall be effective on the close of business of the
Termination Date. Executive hereby tenders his resignation from any and all
directorships, committee memberships or any other positions he holds with the
Company or any of its affiliates, effective as of the Termination Date.

         Section 2.        Company Property. On or prior to the Termination
Date, Executive shall return to the Company all Company-owned property in his
possession.

         Section 3.        Termination Benefits.

                  (a)      Accrued Obligations. As soon as practicable following
the Termination Date, but in no event later than the time period required under
applicable law, the Company shall pay Executive all earned but unpaid base
salary through the Termination Date, pay Executive for any accrued but unused
vacation time, and reimburse Executive for any reasonable unreimbursed expenses
incurred in accordance with Company policy.

                  (b)      Company Stock Options. The parties acknowledge that
Executive has vested options (the "Options") to purchase an aggregate of 115,321
shares of common stock, par value $.001 per share (the "Common Stock" of Idenix
Pharmaceuticals, Inc.). Of such aggregate amount, Options to purchase 110,321
shares of Common Stock, exercisable at a price of $3.00 per share, constitute
the remaining part of an award granted on March 28, 2002 and Options to purchase
5,000 shares of Common Stock, exercisable at $8.50 per share, were granted on

<PAGE>

November 20, 2002. Notwithstanding anything contained in the Idenix
Pharmaceuticals, Inc. 1998 Equity Incentive Plan, as amended (the "Equity Plan")
or any stock option agreements evidencing the Options to the contrary, the
Options shall remain exercisable until July 31, 2004. Except as otherwise
provided in this subsection (b), the Options shall remain subject to the terms
and conditions of the Equity Plan and the applicable stock option agreements
evidencing the Options.

                  (c)      Severance Benefits.

                  (i)      On the Termination Date, the Company shall pay
Executive an amount equal to $458,280, which represents the sum of the remainder
of Executive's signing bonus not previously paid, Executive's annual base salary
from the Termination Date through July 31, 2004, and the target bonus Executive
would reasonably have expected to receive for his service to the Company in
2003.

                  (ii)     Provided that Executive elects to continue his health
insurance pursuant to the Consolidated Omnibus Budget Reconciliation Act of
1985, as amended ("COBRA"), the Company shall pay Executive's COBRA premiums
until the earlier of: (A) the first anniversary of the Termination Date, or (B)
the date Executive becomes eligible for health insurance benefits with a new
employer. Unless otherwise notified by Executive in writing, COBRA coverage will
be deemed elected by Executive as of the Termination Date.

         Section 4.        Full Settlement; Compensation and Benefit Plans.
Except as provided in the last sentence of this Section 4, the amounts payable
under Section 3 above shall constitute full settlement and satisfaction with
respect to all obligations and liabilities of the Company and its respective
affiliates, officers, directors, trustees, employees, shareholders,
representatives and/or agents to Executive. Except as otherwise specifically
provided in this Agreement, by law or pursuant to the express provisions of any
Company employee benefit plan, Executive's participation in all employee benefit
plans and executive compensation plans and practices of the Company shall
terminate on the Termination Date. Notwithstanding anything in this Section 4 to
the contrary, nothing in this Agreement shall affect Executive's right to (i)
indemnification under the terms of the Company's charter and bylaws, (ii)
benefits under any directors' and officers' liability policy maintained by the
Company, in accordance with its terms, and (iii) benefits and any subsequent
payments to which Executive is or becomes entitled as a result of Executive's
sale pursuant to the Purchase Agreement of certain shares of Common Stock
previously owned by Executive..

         Section 5.        Release of Claims. (a) On the Termination Date,
Executive shall execute a General Release of Claims in the form attached hereto
as Exhibit A (the "Executive Release") and the obligations of the Company shall
become effective if the Executive has not revoked the Executive Release at the
expiration of seven day revocation period contemplated therein.

                  (b)      The Company on behalf of itself and its affiliates
hereby represents that as of the date of this Agreement, it does not have any
knowledge of actual, pending or threatened claims against the Executive by the
Company, or any of its affiliates, shareholders, employees or directors of any
kind whatsoever, nor does it have knowledge of facts or circumstances that could
reasonably be expected to give rise to any such claims.

                                       2
<PAGE>

         Section 6.        Taxes. The payments due to Executive under this
Agreement shall be subject to reduction to satisfy all applicable Federal, state
and local withholding tax obligations.

         Section 7.        Non-Admission. Executive and the Company expressly
acknowledge that this Agreement does not constitute an admission by the other
party of any violation of any employment law, regulation, ordinance, or
administrative procedure, or any other federal, state, or local law, common law,
regulation or ordinance, liability for which is expressly denied.

         Section 8.        Non-Disparagement. Executive hereby agrees that,
except as required by applicable law, or compelled by process of law, at any
time following the date hereof, he shall not hereafter make any false,
derogatory or disparaging statements about the Company, which in the case of the
Company shall include its subsidiaries, affiliates and any of the Company's
current officers, directors, employees, or shareholders, or about the Company's
financial condition or business affairs. The Company agrees that, except as
required by applicable law, or compelled by process of law, at any time
following the date hereof, neither it nor any of its affiliates will make any
false, derogatory or disparaging statements about Executive. Additionally, the
Company will direct: (1) those employees of the Company or its affiliates who
have knowledge of the circumstances giving rise to his separation and the terms
of this Agreement and (2) its officers and directors, not make any false,
derogatory or disparaging statements about Executive.

         Section 9.        Non Disclosure and Assignment of Inventions.
Executive acknowledges and reaffirms his obligation to keep confidential all
non-public information concerning the Company, its business, affairs, plans or
prospects (the "Confidential Information") which the Executive acquired during
the course of his employment with the Company and to assign to the Company all
inventions and discoveries made during the course of his employment or
subsequent thereto if such inventions or discoveries were made using or in any
way relying upon the Confidential Information, as stated more fully in the
Invention and Non-Disclosure Agreement_which Executive executed at the inception
of his employment which remains in full force and effect.

         Section 10.       Confidentiality of Agreement. To the extent permitted
by law, Executive and the Company hereby agree to keep confidential the terms
and content of this Agreement and the contents of the negotiations and
discussions resulting in this Agreement, and none of the above shall be
disclosed except as required by applicable law, regulation or order of a court
or governmental agency, to either party's counsel and/or financial advisors, or
as otherwise agreed in writing by the parties' authorized agent, except that
Executive may disclose the above to his immediate family or any potential future
employers of Executive, and the Company may disclose the above to its directors,
officer and employees with a legitimate business need to know. Notwithstanding
anything to the contrary in this Agreement or any other document to which
Executive is a party to or otherwise furnished to Executive, each of Executive
and the Company and each of its directors, employees, representatives or agents,
as applicable, may disclose to any and all persons, without limitation of any
kind, the "tax treatment" and "tax structure" of the arrangements contained
herein together with any and all materials relating to such tax treatment or tax
structure; provided, however, that the foregoing authorization does not permit
disclosure of the identities of the parties hereto. For this purpose, the "tax
treatment" is the purported or claimed Federal income tax treatment of the
arrangement and the "tax structure" is any fact that

                                       3
<PAGE>

may be relevant to understanding the purported or claimed Federal income tax
treatment of the arrangement.

         Section 11.       Opportunity for Advice. By signing this Agreement,
Executive acknowledges that with the advice of the Company, he has had a
reasonable opportunity to consider advice from his legal counsel, and that, he
in fact consulted with an attorney prior to executing this Agreement and the
General Release of Claims attached as Exhibit A fully understanding the terms of
this Agreement, Executive is entering into this Agreement knowingly and
voluntarily.

         Section 12.       Entire Agreement. This Agreement and the General
Release of Claims attached hereto as Exhibit A represent the entire agreement of
the parties with respect to Executive's employment and termination thereof.
Except as specifically provided herein, this Agreement shall supersede the
Employment Agreement in all respects effective as of the Termination Date.
Nothing in this Section 12, however, shall modify, cancel or supersede the
obligations under the Invention and Non-Disclosure Agreement executed by
Executive on March 18, 2002, and the obligations of Executive arising pursuant
to the Purchase Agreement and other agreements related thereto to which the
Executive is a party.

         Section 13.       Applicable Law. THIS AGREEMENT SHALL BE GOVERNED BY
AND CONSTRUED AND ENFORCED IN ACCORDANCE WITH THE LAWS OF THE COMMONWEALTH OF
MASSACHUSETTS APPLICABLE TO CONTRACTS MADE AND TO BE PERFORMED ENTIRELY WITHIN
SUCH STATE. EXECUTIVE HEREBY IRREVOCABLY SUBMITS TO AND ACKNOWLEDGES AND
RECOGNIZES THE JURISDICTION OF THE COURTS IN THE COMMONWEALTH OF MASSACHUSETTS,
OR, IF APPROPRIATE, A FEDERAL COURT IN MASSACHUSETTS OVER ANY SUIT, ACTION OR
OTHER PROCEEDING ARISING OUT OF, UNDER OR IN CONNECTION WITH THIS AGREEMENT OR
THE SUBJECT MATTER HEREOF.

         Section 14.       Severability. In the event that any provision or
portion of this Agreement shall be determined to be invalid or unenforceable for
any reason, in whole or in part, the remaining provisions of this Agreement
shall be unaffected thereby and shall remain in full force and effect to the
fullest extent permitted by law.

         Section 15.       Counterparts. This Agreement may be executed in one
or more counterparts, each of which shall be deemed an original and all of which
together shall be considered one and the same agreement.

                                    [Signatures appear on following page.]

                                       4
<PAGE>

                  IN WITNESS WHEREOF, the parties have executed this Agreement
as of the date and year first above written.

                                        /s/ John P. Dunphy
                                        ---------------------------------
                                        John P. Dunphy

                                        IDENIX (MASSACHUSETTS) INC.

                                        By: /s/ Jean-Pierre Sommadossi
                                        ---------------------------------
                                           Name: Jean-Pierre Sommadossi
                                           Title: Chief Executive Officer

                                       5
<PAGE>

                            GENERAL RELEASE OF CLAIMS

                  1.       John P. Dunphy ("Executive"), for himself and his
family, heirs, executors, administrators, legal representatives and their
respective successors and assigns, in exchange for the consideration contained
in the Separation Agreement to which this release is attached as Exhibit A (the
"Separation Agreement"), which Executive acknowledges is in addition to any
amounts to which he would have otherwise been entitled but for the Separation
Agreement and execution of this General Release of Claims, does hereby release
and forever discharge Idenix Massachusetts, Inc. (the "Company") and any of its
subsidiaries, parent or affiliated companies, and their current or former
directors, officers, employees, shareholders, agents or plan administrators
(each in their individual and corporate capacities) (together with the Company,
the "Released Parties") from any and all actions, causes of action, suits,
controversies, claims, demands, obligations, liabilities and expenses (including
attorney's fees and costs) whatsoever, for or by reason of any matter, cause or
thing whatsoever, whether known or unknown including, but not limited to, all
employment discrimination claims under Title VII of the Civil Rights Act of
1964, 42 U.S.C. Section 2000e et seq., the Age Discrimination in Employment Act,
29 U.S.C. Section 621 et seq., the Americans With Disabilities Act of 1990, 42
U.S.C. Section 12101 et seq., and the Massachusetts Fair Employment Practices
Act, M.G.L. c.151B, Section 1 et seq., all as amended; all claims arising out of
the Family and Medical Leave Act, 29 U.S.C. Section 2601 et seq., the Fair
Credit Reporting Act, 15 U.S.C. Section 1681 et seq., the Employee Retirement
Income Security Act of 1974 ("ERISA"), 29 U.S.C. Section 1001 et M., the
Massachusetts Civil Rights Act, M.G.L. c.12 Sections 11H and 111, the
Massachusetts Equal Rights Act, M.G.L. c.93, Section 102 and M.G.L. c.214,
Section 1C, the Massachusetts Labor and Industries Act, M.G.L. c.149, Section 1
et seq., the Massachusetts Privacy Act, M.G.L. c. 214, Section 1B, and the
Massachusetts Maternity Leave Act Act, M.G.L. c. 149, Section 105(d), all as
amended; all common law claims including, but not limited to, actions in tort,
defamation and breach of contract (including all claims relating to or arising
under the offer letter of employment dated January 11, 2002), wrongful
discharge, or intentional infliction of emotional distress; all claims to any
non-vested ownership interest in the Company, contractual or otherwise,
including but not limited to claims to stock or stock options; and any claim or
damage arising out of Executive's employment with or separation from the Company
(including a claim for retaliation) under any common law theory or any federal,
state or local statute or ordinance not expressly referenced above. Executive
acknowledges that the Company encouraged him to consult with an attorney of his
choosing, and through this General Release of Claims encourages him to consult
with his attorney with respect to possible claims under the Age Discrimination
in Employment Act ("ADEA") and that he understands that the ADEA is a Federal
statute that, among other things, prohibits discrimination on the basis of age
in employment and employee benefits and benefit plans. Without limiting the
generality of the release provided above, Executive expressly waives any and all
claims under ADEA that he may have as of the date hereof. Executive further
understand that by signing this General Release of Claims he is in fact waiving,
releasing and forever giving up any claim under the ADEA as well as all other
laws within the scope of this paragraph 1 that may have existed on or prior to
the date hereof. Notwithstanding anything in this paragraph 1 to the contrary,
this General Release of Claims shall not apply to (i) any actions to enforce
rights arising under, or any claim for benefits which may be due Executive
pursuant to, the Separation Agreement, (ii) any rights or claims that may arise
as a result of events occurring after the date this General Release of Claims is
executed, (iii) any indemnification rights Executive may have as a former
officer or director of the Company, (iv) any claims for benefits under any
directors' and officers' liability policy

                                      A-1-
<PAGE>

maintained by the Company, in accordance with its terms, and (v) any payments
and benefits Executive is entitled to as a result of the sale of his shares in
the Company pursuant to the Purchase Agreement (as defined in the Separation
Agreement).

                  2.       Notwithstanding paragraph 1 above, nothing in this
General Release of Claims prevents Executive from filing, cooperating with, or
participating in any proceeding before the Equal Employment Opportunity
Commission or a state fair employment practices agency (except that Executive
acknowledges that he may not be able to recover any monetary benefits in
connection with any such claim, charge or proceeding).

                  3.       Executive hereby acknowledges that the Company has
informed him that he has up to twenty-one (21) days to sign this General Release
of Claims and he may knowingly and voluntarily waive that twenty-one (21) day
period by signing this General Release of Claims earlier. Executive also
understands that he shall have seven (7) days following the date on which he
signs this General Release of Claims within which to revoke it by providing a
written notice of his revocation to the Company.

                  4.       Executive acknowledges that this General Release of
Claims will be governed by and construed and enforced in accordance with the
internal laws of the Commonwealth of Massachusetts applicable to contracts made
and to be performed entirely within such State.

                  5.       Executive acknowledges that he has read this General
Release of Claims, that he has been advised that he should consult with an
attorney before he executes this general release of claims, and that he
understands all of its terms and executes it voluntarily and with full knowledge
of its significance and the consequences thereof.

                  6.       This General Release of Claims shall take effect on
the eighth day following Executive's execution of this General Release of Claims
unless Executive's written revocation is delivered to the Company within seven
(7) days after such execution.

                                            /s/ John P. Dunphy
                                            ---------------------------
                                            John P. Dunphy
                                            July 31, 2004

                                      A-2-