Files
codex/codex-rs
cassirer-openai c826ca1286 Preserve accepted tool outputs and local resets in rollout traces (#61973)
## Why

Accepted tool outputs may never appear in a later inference request, and request preparation can strip their history IDs. Replay needs to retain these outputs and match them to later snapshots, including trimmed results and outputs with identical wire bodies.

## What changed

- Capture accepted function and custom tool outputs, preserving their acceptance order, identity, and tool provenance during replay.
- Record stripped tool output IDs alongside inference requests so replay can restore identity without changing the captured wire payload. Reuse accepted items and adopt their first model-visible snapshot bodies.
- Record compaction checkpoints for local context-window resets using the selected input and frozen installed history, including goal edits retained during installation.
- Exclude `configuration_update` items from normalized conversation history.

## Testing

Add replay coverage for outputs accepted without subsequent inference, trimmed results, identical outputs with distinct IDs, and acceptance before or after a request snapshot. Extend checkpoint coverage to verify that retained goal edits are captured and later edits do not alter the checkpoint.

GitOrigin-RevId: 70f737782f5000812f389a4e01b9f9690e39549f
2026-11-17 05:35:07 +00:00
..
…
…
…
…