* fix(codex): keep foreground commands out of background tasks
Codex lists live terminals before their initial tool call returns. Exclude commands owned by an active turn so ordinary shell calls do not flash the background-work pill, while preserving processes left running by earlier turns.
* fix(codex): preserve foreground ownership during resume
Start terminal inventory ownership before installing notification handlers so autonomous commands emitted during thread resume remain foreground until their turn settles. Use named fields for the new inventory inputs.