Skip to content

fix(core): honor maxImages in Anthropic CUA screenshot compression #2043

@BABTUNA

Description

@BABTUNA

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions