Skip to content

chatd: view_image follow-ups declined from the #250 review #291

Closed

Description

@ibetitsmike

Coder Agents acted on behalf of @ibetitsmike.

Follow-up to #250. The view_image stack (#284 split into three PRs) declined these review findings as out of scope. Each is a possible later improvement, not a defect in what the stack ships.

  • Compaction head budget. The compaction override bound counts the whole prompt and not a separate budget for the head it summarizes, so it can drop an image a little earlier than needed.
  • Animated WebP. The tool detects animated GIFs and rejects them. An animated WebP (ANMF chunks) still passes.
  • Later GIF frames. Only the first GIF frame is decoded. Damaged data in a later frame passes. Animated GIFs are rejected, so this only matters if they are allowed later.
  • WebP bitstream. There is no WebP decoder in the fork, so a WebP with intact chunks and damaged VP8 or VP8L data passes.
  • Image count with many other images. The newest viewed image always stays in the prompt, so a prompt that already holds 20 or more other images goes over Anthropic's 20 image threshold.
  • Bound ownership after the custom agent policy (feat(coderd/x/chatd): bound the viewed images a prompt carries #309 review). With fork-view-image off, a chat's dynamic view_image skips the prompt bound even when the custom agent policy later drops that dynamic tool. Ownership should be decided after the policy filter.
  • ANMF frames (fix(coderd/x/chatd): reject damaged and animated images in view_image, and document it #310 review). A WebP with a VP8X header and an empty or malformed ANMF chunk passes. Validate the 16 byte frame header and the nested VP8 or VP8L subchunk, or reject animated WebP.

Each item needs a decision on whether it is worth a dependency or more code.

Activity

  1. added
    enhancement
    on Nov 14, 2026
  2. ibetitsmike commented on Nov 17, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    Merged as #382 (b25a79b) at 17:21Z on 2026-11-17. Fixed: animated WebP rejection, the 20-image count for the newest viewed image, and bound ownership that follows the custom agent tool policy. Declined with reasons in the PR: WebP decoding, later GIF frames, compaction head budget. Gates and tests: #382 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions