Facts

[A. AG] (defendant, landlord) had leased retail premises on Strasse [U.] in [V.] to [C. SA] by contract dated 6 December 1983, for the continued operation of a department store. The contract provided for a firmly agreed ten-year extension right and a right of first refusal to the premises until 31 January 2014. By addendum of 5 November 2001, the landlord undertook to submit to the tenant an offer to continue the contract for at least five years on market-standard terms no later than 31 January 2011; provided that agreement was reached by 31 July 2012, otherwise the tenancy would end on 31 January 2014. The tenancy was transferred retroactively as of 1 January 2002 to [B. AG] (plaintiff, tenant) by declaration of 12 February 2002. No agreement on the extension was reached.

On 5 May 2011 the plaintiff initiated conciliation proceedings and on 14 March 2012 filed an action with the Zurich Tenancy Court. It requested that the court determine the applicable rent (alternatively 6.5% of turnover) and that the defendant be ordered to submit a binding offer. After the taking of evidence, including numerous witness examinations in July and September 2014, the president of the Tenancy Court, by order of 29 September 2014, invited the parties to comment on the question of subject-matter jurisdiction; both parties considered the Tenancy Court to have jurisdiction, and by order of 27 October 2014 the proceedings were continued. By judgment of 22 December 2014, the Tenancy Court ordered the defendant to submit an offer for an extension from 1 February 2014 and dismissed the remaining requests.

Both parties appealed to the Zurich Cantonal Court, II. Civil Chamber. The Cantonal Court joined the proceedings and heard the parties on subject-matter and functional jurisdiction. By judgment of 4 May 2015, it declined to enter into the action. It allocated the first-instance court costs of CHF 202'382.50 as CHF 151'787.-- against the plaintiff and CHF 50'595.50 against the defendant; the plaintiff was ordered to pay a reduced party compensation of CHF 136'080.-- to the defendant. The second-instance court costs of CHF 10'000.-- were divided equally between the parties.

By civil law appeal (proceeding 4A_291/2015), the defendant seeks annulment and remittal. The plaintiff (proceeding 4A_301/2015) seeks annulment of dispositive paragraphs 2 and 3, alternatively waiver of party compensation, subalternatively an equal division of costs, and subsubalternatively remittal. The lower court waived submission of a response.

Considerations

The two appeals concern the same contested decision and are therefore joined. The contested judgment is a final decision (Art. 90 FSCA) of a superior cantonal court (Art. 75 FSCA); the amount in dispute exceeds the tenancy threshold under Art. 74 para. 1 lit. a FSCA. The appeals are admissible.

The Tenancy Court had characterised the action as a commercial dispute within the meaning of Art. 6 para. 2 CPC, for which the Commercial Court was mandatorily and exclusively competent according to ATF 140 III 155; the conflicting provision of § 126 GOG/ZH was contrary to federal law. Despite the lack of jurisdiction, the Tenancy Court issued a decision on the merits, invoking the protection of legitimate expectations and procedural economy. By contrast, the Cantonal Court considered subject-matter jurisdiction to be mandatory and ordered non-entry into the action. The defendant wrongly complains that the Cantonal Court interfered with a final interlocutory decision: neither the evidentiary order of 27 May 2014 nor the presidential order of 27 October 2014 constitutes an independently appealable interlocutory decision on jurisdiction (Art. 237 para. 2 CPC, Art. 308 para. 1 lit. a CPC; Art. 238 lit. f CPC does not apply).

Subject-matter jurisdiction must be examined ex officio (Art. 60 CPC) and is not at the disposal of the parties; appearing before a Commercial Court lacking subject-matter jurisdiction is precluded under federal law (ATF 140 III 355 consid. 2.4). This also applies in appellate proceedings, regardless of whether a jurisdictional objection is raised. The court is not prevented from examining its jurisdiction at a later procedural stage. The interest in rapid resolution of the dispute and the invocation of Art. 2 CC, Art. 5, 9 and 29 Cst. as well as Art. 6 ECHR cannot override the mandatory jurisdictional scheme, particularly because the parties themselves challenged the merits decision. The defendant's reliance on legitimate expectations cannot establish jurisdiction, since it did not choose the court, and any legitimate expectation of the plaintiff could not open an impermissible legal route. Non-entry into the action is therefore consistent with federal law.

As regards court costs, the principle of loss applies under Art. 106 para. 1 CPC, whereby the claimant party is deemed to have lost in the case of non-entry. Under Art. 107 para. 1 CPC, the court may depart from this at its discretion, for example where a party was reasonably induced to bring proceedings in good faith (lit. b) or where special circumstances exist (lit. f); under Art. 107 para. 2 CPC, costs may be imposed on the canton on grounds of equity. The Federal Supreme Court exercises restraint in discretionary decisions and intervenes only in cases of abuse of discretion or manifest unfairness.

The plaintiff cannot show…