v0.22.4
Summary
Corrects the #38 fix from v0.22.3 to match Codex's real SubagentStop wire schema.
- #38 — Codex SubagentStop advisor detection. v0.22.3 probed ~40 nested payload keys (
metadata.agent_name,agent.role,tool_input.agent.name, …) that the CodexSubagentStopevent never sends. The authoritative wire schema is flat:agent_id(UUID) +agent_typeonly — no nestedagent/metadataobject. The hook now reads the flatagent_type/subagent_typerole (the field the pre-v0.22.3 code already used); anadvisorRoleValuefilter keeps only an explicitadvisor, so a UUID identity can never masquerade as the role. UUID-only payloads with no advisor role write no proof (anti-forgery).
Validated with live codex exec multi-agent spawns on codex-cli 0.133.0: a correctly-spawned advisor surfaces agent_role:"advisor"; an ad-hoc/unregistered subagent surfaces agent_role:null + a random nickname. For a deterministic Codex advisor proof regardless of how the subagent is spawned, use .harness/scripts/codex-advisor-run.mjs.
The #38 regression test now exercises the real flat schema instead of a fabricated nested payload.
Validation
node scripts/check-version-sync.mjs— all manifests pinned to v0.22.4node scripts/verify-contracts.mjs— contracts verifiednpm run lint— 338 files OKnpm test— 913/913 pass (incl. livecodex exece2e)npm run check:readiness— PASSED