Files
codex/codex-rs/guardian-context
ioanbudea-OAI ab7a93771e Honor Guardian retention settings for assistant messages (#62828)
## Why

The fixed retention window can discard assistant messages before elastic
Guardian reviews can use them as context for a user's reply.

## What changed

Apply the thread's Guardian retention policy when recording assistant messages,
including confirmed messages sent through the user messaging tool. Keep full
text within the configured record limit and the overall assistant history byte
budget. Preserve an incomplete marker when a confirmed delivery exceeds the
record limit.

Recover the thread's retention settings from saved history and compaction
checkpoints. Fixed-budget reviews continue to use the fixed retention window.

## Testing

Add coverage for record limits during capture and restore, thread-owned
settings recovery, and replay of oversized confirmed deliveries.

GitOrigin-RevId: e828f06824ce6712910a9cc5ef42a438d1ddf27e
2026-11-20 20:10:51 +00:00
..