why
ClientOptions.maxImages existed, but Anthropic CUA still always used the default screenshot compression behavior (keepMostRecentCount = 2).
That means users could tune screenshot retention for Microsoft CUA, but Anthropic ignored the same option.
what to change
- Wire
clientOptions.maxImages into AnthropicCUAClient
- Use that value when calling
compressConversationImages(...)
- Keep existing default behavior when
maxImages is not provided
validation
- Add/maintain unit tests covering:
- default behavior (keep 2)
- override behavior (e.g. keep 1)
maxImages=0 behavior
why
ClientOptions.maxImagesexisted, but Anthropic CUA still always used the default screenshot compression behavior (keepMostRecentCount = 2).That means users could tune screenshot retention for Microsoft CUA, but Anthropic ignored the same option.
what to change
clientOptions.maxImagesintoAnthropicCUAClientcompressConversationImages(...)maxImagesis not providedvalidation
maxImages=0behavior