This is the receiver-side companion to the main native Codex integration spec, which now lives in the Codex repo.
Main ownership split:
- Codex repo
- sender contract
- payload normalization
- lifecycle emission coverage
- event identity/version/source semantics
- live sender-side contract verification
- agentmemory repo
- ingest validation
- persistence-class handling
- compatibility behavior for supported native payload versions
This file should stay narrow. It is not the primary home for the full native Codex integration design.
agentmemory should ensure:
- only supported native hook families are accepted for normal ingestion
- supported native payload versions are explicit and test-covered
- unsupported or malformed native payloads fail clearly
- persistence class is respected so diagnostics-only lifecycle events do not pollute recall storage
- compatibility tests cover the native Codex wire shapes that agentmemory claims to support
/agentmemory/observe and mem::observe should reject unknown hook families
rather than silently storing them.
If Codex sends payload_version, agentmemory should validate it and fail
cleanly on unsupported versions instead of guessing.
If Codex sends event_id, agentmemory should use it for stronger idempotency
and retry handling where appropriate.
agentmemory should support distinct handling for:
persistentephemeraldiagnostics_only
At minimum, shutdown markers and similar low-signal lifecycle events should not automatically land in the same long-term retrieval lane as real memory-bearing observations.
agentmemory-side coverage should include:
- rejection of unknown hook families
- supported native Codex post-tool payload shapes
- supported native Codex post-tool-failure payload shapes
- handling of explicit payload version semantics
- handling of event identity where provided
- persistence-class behavior for low-signal lifecycle events
The main sender-side spec belongs in the Codex repo under:
docs/agentmemory-payload-quality.md