The general rule is that a contract is freely assignable unless it is (1) for a personal service or (2) against public policy. Parties incorporate assignment clauses because they want to be notified about a change in the relationship and they want an opportunity to decide whether to continue the relationship.
Mergers and acquisitions can be structured as: (a) direct merger, (b) reverse triangular merger (the acquiring company creates a subsidiary to purchase the target, which, in turn, absorbs the acquirer’s subsidiary), (c) forward-triangular merger (the acquiring company purchases the target company through a subsidiary of the acquirer), (d) stock purchase, or (e) asset purchase.
Does the assignment clause in your agreement do what you think it does in a merger and acquisition context?
A simple assignment clause would be "This agreement shall not be assigned or transferred by Party A without first obtaining the consent of Party B." The issue with this simple assignment clause is that certain merger and acquisition deal structures would not trigger the consent requirement of this clause. Consent would be triggered during an asset purchase. It is not triggered in a stock purchase because the acquiring company buys all the stock of the target from the shareholders, and the assets are not conveyed to a different entity. It is not triggered in a reverse triangular merger because the target company survives the merger as a subsidiary of the acquiring company. It is not triggered in a forward triangular merger because the subsidiary obtains the target company's assets and liability by operation of law.
If you revise the clause to add operation of law -- "This agreement shall not be assigned or transferred by operation of law or otherwise by Party A without first obtaining the consent of Party B." This revised clause should now additionally be triggered in direct mergers and forward triangular mergers. But consent would still not be triggered by a reverse triangular merger or a stock purchase.
If you further revise the clause to add change of control language -- "This agreement shall not be assigned or transferred by operation of law or otherwise by Party A without first obtaining the consent of Party B. Any change in control of Party A resulting from a merger, consolidation, stock transfer or asset sale shall be deemed an assignment or transfer for purposes of this Agreement that requires Party B’s prior written consent." This revised assignment clause should now additionally be triggered in deal structures where the Party A is the target of the merger or acquisition.