Skip to content

Avoid replaying generated image payloads#73

Merged
cbusillo merged 1 commit into
local/cbusillo-overlayfrom
fix/image-history-replay-compaction
May 13, 2026
Merged

Avoid replaying generated image payloads#73
cbusillo merged 1 commit into
local/cbusillo-overlayfrom
fix/image-history-replay-compaction

Conversation

@cbusillo
Copy link
Copy Markdown
Owner

Summary

  • stop converting prior image_generation_call outputs back into full data:image/... user images during stateless replay
  • replace generated image payloads with a bounded assistant text placeholder that preserves status, byte count, and a capped revised prompt
  • add a two-turn integration test proving the second request no longer resends generated image payload bytes

Why

Generated images were being recorded in history and replayed as full input images on later turns, which could burn rate limit and request budget repeatedly. This keeps useful context without resending the raw image data.

Tracking

Refs #68
Refs #63

Validation

  • cargo test -p code-core image_generation -- --nocapture
  • cargo test -p code-core --test image_history_replay generated_images_are_not_replayed_in_next_turn_request_payload -- --nocapture
  • ./build-fast.sh

@cbusillo cbusillo merged commit d632e9c into local/cbusillo-overlay May 13, 2026
1 check passed
@cbusillo cbusillo deleted the fix/image-history-replay-compaction branch May 13, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant