<PAGE>

                                                                    EXHIBIT 10.4

                            Stock Option Agreement
                           Onyx Software Corporation


I.   OPTION GRANT. ONYX SOFTWARE CORPORATION, a Washington corporation (the
     "Company") hereby grants a nonqualified stock option to purchase a total of
     150,000 shares of Common Stock of the Company, par value $0.01 per share,
     (the "Common Stock") as of January 5, 2001 ("Grant Date") to KEVIN CORCORAN
     (the "Optionee"), subject in all respects to the terms and provisions of
     this Stock Option Agreement (the "Option"). This Option shall be governed
     by, and construed in accordance with, the laws of the state of Washington
     without regard for principles of conflict of laws.

II.  VESTING SCHEDULE. The Vesting Initiation Date shall be January 5, 2001.
     This Option shall vest and become exercisable as to 25% of the total number
     of shares of Common Stock covered by this Option on the one year
     anniversary of the Vesting Initiation Date and an additional 2.0833% of the
     shares covered by the Option shall vest each month thereafter, with the
     result that the Option shall be fully vested and exercisable four years
     after the Vesting Initiation Date.

III. PRICE. The Option exercise price per share (the "Exercise Price") as
     determined by the Board of Directors (the "Board") of the Company is
     $9.125. The Exercise Price shall be paid by delivery of cash or, subject to
     the discretion of the Board, by delivery of an approved equivalent to cash.

IV.  PURCHASE FOR INVESTMENT. This Option may not be exercised if the issuance
     of shares of Common Stock pursuant to an exercise would constitute a
     violation of any applicable federal or state securities or other law or
     valid regulation. Any other provision of this Option notwithstanding, the
     obligation of the Company to issue shares pursuant to an exercise of the
     Option shall be subject to all applicable laws, rules and regulations and
     such approval by any regulatory body as may be required. The Company
     reserves the right to restrict, in whole or in part, the delivery of shares
     prior to the satisfaction of all legal requirements relating to the
     issuance of such shares, to their registration, qualification or listing or
     to an exemption from registration, qualification or listing. The Optionee,
     as a condition to his exercise of this Option, shall sign a Letter of
     Investment satisfactory to the Company's counsel and represent, among other
     things, to the Company that the shares of Common Stock that he acquires
     under this Option are being acquired by him for investment and not with a
     view to distribution or resale and that he understands that such shares of
     Company Common Stock may not be sold until (a) there is an effective
     registration statement under the Securities Act of 1933, as amended, (the
     "Act") and applicable state securities laws covering any such transaction
     involving such shares of Common Stock or (b) the Company receives an
     opinion of legal counsel for the holder of such shares of Common Stock
     (concurred in by legal counsel of the Company) stating that such
     transaction is exempt from registration.

V.   NON-ASSIGNABILITY. The Option may not be transferred or hypothecated in any
     manner and shall only be exercisable by the Optionee or his legal
     representative. The
<PAGE>

     terms of this Option shall be binding upon the executors, administrators,
     heirs, successors, and assigns of the Optionee.

VI.  EXERCISE.

     A.   This Option shall be exercisable, to the extent of the number of
          shares purchasable by Optionee at the date of termination, only (a)
          within one year after such termination if the Optionee's termination
          is coincident with the Optionee's death or Disability (as defined
          below) or (b) within three months after the date that Optionee ceases
          to be an employee, director, officer, consultant, agent, advisor or
          independent contractor of the Company or a subsidiary if termination
          of the Optionee's employment or services is for any reason other than
          Disability, but in no event later than the remaining Term of the
          Option. Any portion of this Option exercisable at the time of the
          Optionee's death may be exercised, to the extent of the number of
          shares purchasable by the Optionee at the date of the Optionee's
          death, by the personal representative of the Optionee's estate or the
          person(s) to whom the Optionee's rights under the Option have passed
          by will or the applicable laws of descent and distribution, at any
          time or from time to time within one year after the date of death, but
          in no event later than the remaining Term of the Option. Any portion
          of the Option that is not exercisable on the date of termination of
          the Optionee's employment or services shall terminate on such date,
          unless the Board determines otherwise. "Disability" means "disability"
          as that term is defined for purposes of Section 22(e)(3) of the
          Internal Revenue Code of 1986, as amended. "Cause" means dishonesty,
          fraud, misconduct, unauthorized use or disclosure of confidential
          information or trade secrets, or conviction or confession of a crime
          punishable by law (except minor violations), in each case as
          determined by the Board, and its determination shall be conclusive and
          binding. This Option may be exercised only for whole shares of Common
          Stock.

     B.   This Option may not be exercised more than ten (10) years from the
          date hereof (the "Term"), and may be exercised during the Term only in
          accordance with the terms and provisions set forth herein. In case of
          termination of the Optionee's employment for Cause, the Option shall
          automatically terminate upon first notification to the Optionee of
          such termination, unless the Board determines otherwise. If the
          Optionee's employment with the Company is suspended pending an
          investigation of whether the Optionee shall be terminated for Cause,
          all the Optionee's rights under the Option likewise shall be suspended
          during the period of investigation.

     C.   In the event of a Corporate Transaction (as defined below) involving
          the Company, any portion of this Option that is at the time
          outstanding shall automatically accelerate so that such Option shall,
          immediately prior to the specified effective date for the Corporate
          Transaction, become 100% vested and exercisable, except that such
          acceleration will not occur if, in the opinion of the Company's
          outside accountants, it would render unavailable "pooling of interest"
          accounting for a Corporate Transaction that would otherwise qualify
          for such

                                       2
<PAGE>

          accounting treatment. This Option shall not so accelerate, however, if
          and to the extent that such Option is, in connection with the
          Corporate Transaction, either to be assumed by the successor
          corporation or parent thereof (the "Successor Corporation") or to be
          replaced with a comparable option or award for the purchase of shares
          of the capital stock of the Successor Corporation. The determination
          of option comparability shall be made by the Board, and its
          determination shall be conclusive and binding. If the foregoing
          applies, this Option shall terminate and cease to remain outstanding
          immediately following the consummation of the Corporate Transaction,
          except to the extent assumed by the Successor Corporation. If this
          Option is assumed or replaced in a Corporate Transaction and does not
          otherwise accelerate at the time of the Corporate Transaction, it
          shall be accelerated in the event that the Optionee's employment or
          services should subsequently terminate within two years following such
          Corporate Transaction, unless such employment or services are
          terminated by the Successor Corporation for Cause or by the Optionee
          voluntarily without Good Reason (as defined below). A "Corporate
          Transaction" means any of the following events: (a) consummation of
          any merger or consolidation of the Company in which the Company is not
          the continuing or surviving corporation, or pursuant to which shares
          of the Common Stock are converted into cash, securities or other
          property, if following such merger or consolidation the holders of the
          Company's outstanding voting securities immediately prior to such
          merger or consolidation own less than a majority of the outstanding
          voting securities of the surviving corporation; (b) consummation of
          any sale, lease, exchange or other transfer in one transaction or a
          series of related transactions of all or substantially all of the
          Company's assets other than a transfer of the Company's assets to a
          majority-owned subsidiary corporation of the Company; or (c) approval
          by the holders of the Common Stock of any plan or proposal for the
          liquidation or dissolution of the Company. Ownership of voting
          securities shall take into account and shall include ownership as
          determined by applying Rule 13d-3(d)(1)(i) (as in effect on the date
          hereof) under the Securities and Exchange Act of 1934, as amended.
          "Good Reason" shall mean the occurrence of any of the following events
          or conditions and the failure of the Successor Corporation to cure
          such event or condition within 30 days after receipt of written notice
          from the Optionee: (a) a change in the Optionee's status, title,
          position or responsibilities (including reporting responsibilities)
          that, in the Optionee's reasonable judgment, represents a substantial
          reduction in the status, title, position or responsibilities as in
          effect immediately prior thereto; the assignment to the Optionee of
          any duties or responsibilities that, in the Optionee's reasonable
          judgment, are materially inconsistent with such status, title,
          position or responsibilities; or any removal of the Optionee from or
          failure to reappoint or reelect the Optionee to any of such positions,
          except in connection with the termination of the Optionee's employment
          for Cause, for Disability or as a result of his death, or by the
          Optionee other than for Good Reason; (b) a reduction in the Optionee's
          annual base salary; (c) the Successor Corporation's requiring the
          Optionee (without the Optionee's consent) to be based at any place
          outside a 35-mile radius of his or her place of employment prior to a
          Corporate Transaction,

                                       3
<PAGE>

          except for reasonably required travel on the Successor Corporation's
          business that is not materially greater than such travel requirements
          prior to the Corporate Transaction; or (d) the Successor Corporation's
          failure to (i) continue in effect any material compensation or benefit
          plan (or the substantial equivalent thereof) in which the Optionee was
          participating at the time of a Corporate Transaction, or (ii) provide
          the Optionee with compensation and benefits substantially equivalent
          (in terms of benefit levels and/or reward opportunities) to those
          provided for under each material employee benefit plan, program and
          practice as in effect immediately prior to the Corporate Transaction.

     D.   This Option may be exercised for all or part of the shares eligible
          for exercise by presenting a written notice (the "Notice") to the
          Company that this Option is exercised in strict accordance with the
          terms and provisions of this Option. The Company shall determine
          whether or not the Notice complies with the terms and provisions of
          this Option. Such Notice shall identify this Option, state the number
          of shares as to which the Option is exercised and be signed by the
          Optionee. Delivery of the cash or cash equivalent in payment for the
          shares to be purchased pursuant to the exercise of this Option shall
          accompany the Notice. The Letter of Investment, representations and
          such other documentation required by Section IV hereof shall also
          accompany the Notice. If the Optionee is deceased, the Notice shall be
          signed, and if the Optionee is Disabled, it may be signed, by the
          Optionee's legal representatives or beneficiaries, and in all
          instances shall be accompanied by evidence satisfactory to the Company
          and its transfer agent of the right of such person or persons to
          exercise this Option.

     E.   The Optionee shall make arrangements satisfactory to the Company for
          the satisfaction of any withholding tax obligations that arise in
          connection with his Option. The Company shall not be required to issue
          any shares of Common Stock until such obligations are satisfied.

VII. MARKET STANDOFF. In connection with any underwritten public offering by the
     Company of its equity securities pursuant to an effective registration
     statement filed under the Securities Act, Optionee shall not sell, make any
     short sale of, loan, hypothecate, pledge, grant any option for the purchase
     of, or otherwise dispose or transfer for value or otherwise agree to engage
     in any of the foregoing transactions with respect to, any shares issued
     pursuant to this Option without the prior written consent of the Company or
     its underwriters. Such limitations shall be in effect for such period of
     time as may be requested by the Company or such underwriters and agreed to
     by the Company's officers and directors with respect to their shares;
     provided, however, that in no event shall such period exceed 180 days.
     Holders of shares issued pursuant to this Option shall be subject to the
     market standoff provisions of this paragraph only if the officers and
     directors of the Company are also subject to similar arrangements. In the
     event of any stock split, stock dividend, recapitalization, combination of
     shares, exchange of shares or other change affecting the outstanding Common
     Stock effected as a class without the Company's receipt of consideration,
     then any new, substituted or additional securities distributed with respect
     to the purchased shares shall be immediately subject to the provisions of
     this Section VII., to the same extent the purchased shares are at such

                                       4
<PAGE>

       time covered by such provisions. In order to enforce the limitations of
       this Section VII., the Company may impose stop-transfer instructions with
       respect to the purchased shares until the end of the applicable standoff
       period.

VIII.  EFFECT OF CHANGE IN COMMON STOCK SUBJECT TO OPTION. If the outstanding
       shares of Common Stock shall at any time be changed or exchanged by
       declaration of a stock dividend, split-up, combination of shares, or
       recapitalization, the number and kind of shares subject to this Option,
       and the Exercise Price, shall be appropriately and equitably adjusted so
       as to maintain the proportionate number of shares subject to this Option
       and the Exercise Price in relation to the change in stock; provided,
       however, that no adjustment shall be made by reason of the distribution
       of subscription rights on outstanding stock.

IX.    AMENDMENT OR ALTERATION. The Board may amend or alter this Option, except
       that no amendment or alteration shall be made which would impair the
       rights of the Optionee hereunder, without his consent, and, except
       further, this Option shall be subject to the requirement that, if, at any
       time the Board shall determine, in its discretion, that the listing,
       registration or qualification of the stock issuable or transferable upon
       exercise thereof upon any securities exchange or under any state or
       federal law or the consent or approval of any governmental regulatory
       body is necessary or desirable as a condition of, or in connection with,
       the granting of this Option or the issue, transfer, or purchase of shares
       hereunder, this Option may not be exercised in whole or in part unless
       such listing, registration, qualification, consent, or approval shall
       have been effected or obtained free of any conditions not acceptable to
       the Board.

X.     OPTION NOT A SERVICE CONTRACT. This Option is not an employment contract
       and nothing in this Option shall be construed as giving Optionee any
       right to be retained in the employ of the Company or limit the Company's
       right to terminate the employment or services of Optionee.

XI.    NO RIGHTS AS A SHAREHOLDER. The Optionee, or a transferee of the
       Optionee, shall have no rights as a shareholder with respect to any
       Common Stock covered by the Option until such person becomes entitled to
       receive such Common Stock by filing a Notice and paying the Exercise
       Price pursuant to the terms of this Option.

                                             ONYX SOFTWARE CORPORATION


                                             By:  /s/ Brent Frei
                                                --------------------------------
                                                       Chief Executive Officer

                                       5
<PAGE>

If the following acknowledgment and acceptance is not executed within ten (10)
days of the effective date of this Option, it shall lapse and be treated for all
purposes as if it were never granted.

The Optionee acknowledges and represents that he is familiar with and
understands the terms and provisions of this Option. The Optionee hereby accepts
this Option subject to all the terms and provisions contained herein. The
Optionee hereby agrees to accept as binding, conclusive, and final all decisions
and interpretations of the Board upon any questions arising under the Option.

Dated: 1/18/01

WITNESS:                                    OPTIONEE:


  /s/ Scott Padlick                             /s/ Kevin J. Corcoran
-----------------------------------         ------------------------------------

                                       6