Track client-authored developer messages in rollout history (#38243)

## What changed

- Mark developer messages received from clients with `client_authored` harness
  metadata when `retain_client_developer_messages` is enabled.
- Carry that provenance through pending input and persist it alongside rollout
  response items without adding it to provider requests or the serialized
  `TurnInput` payload.
- Preserve existing behavior for unannotated response items and when the
  feature is disabled.

## Testing

- Cover client item injection before and during turns, additional application
  context, rollout replay, image resize notices, and serialization boundaries.

GitOrigin-RevId: f385c177732becde732272e4b8440eb91f5c1039
This commit is contained in:
rka-oai authored and copyberry committed 2026-08-12 20:05:49 +00:00
1 parent 3d7bb2dd2e
commit 0e0ef5d818
16 files changed
+423 -60

No files matched your search

+1 -1
View File
@@ -1331,7 +1331,7 @@ async fn read_head_for_summary_omits_harness_metadata() {
ordinal: None,
item: RolloutItem::ResponseItem(ResponseItemEnvelope {
item: response_item.clone(),
metadata: Some(CodexHarnessMetadata {}),
metadata: Some(CodexHarnessMetadata::default()),
}),
};
fs::write(