I've been reading Hagino's thesis introducing CPL, and they have a gem of a definition on p123:
left object ord with pro is
ozero : 1 → ord
sup : exp(nat, ord) → ord
end object
To translate from CPL into something more familiar, let us work in a Cartesian closed category with a natural numbers object $\Bbb{N}$, and have $O$ be an object equipped with arrows $z : 1 \to O$ and $s : O^\Bbb{N} \to O$, such that for any $f : 1 \to X$ and $g : X^\Bbb{N} \to X$, $\exists!k : O \to X$ making the following diagram commute:
$\require{AMScd}$ \begin{CD} 1 @> z >> O @< s << O^\Bbb{N} \\ @| @V k VV @V k \circ - VV \\ 1 @> f >> X @< g << X^\Bbb{N} \end{CD}
Hagino calls $k$ the $\mathrm{pro}(f,g)$, which might stand for "primitive recursion on ordinals", but I'm not sure exactly what this is. Could this be a categorical definition of an ordinal numbers object?
Edit: From a discussion in #categorytheory on Libera IRC, we suspect that this definition cannot possibly work without one additional natural transformation in the CPL declaration:
osucc : ord → ord
This would cause Hagino's definition to line up with Escardó's definition of ordinals in Agda. The informal reasoning is that ordinals can be constructed by starting at zero, taking a successor ordinal, or taking a limit ordinal; this means that we need three constructors.