Skip to content

v0.22.4

Choose a tag to compare

@tuanle96 tuanle96 released this 09 Jun 03:08
· 24 commits to main since this release

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 Codex SubagentStop event never sends. The authoritative wire schema is flat: agent_id (UUID) + agent_type only — no nested agent/metadata object. The hook now reads the flat agent_type/subagent_type role (the field the pre-v0.22.3 code already used); an advisorRoleValue filter keeps only an explicit advisor, 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.4
  • node scripts/verify-contracts.mjs — contracts verified
  • npm run lint — 338 files OK
  • npm test — 913/913 pass (incl. live codex exec e2e)
  • npm run check:readiness — PASSED