Skip to content

[Bug]: Control UI reprocesses historical images on session:history (repeated agents/tool-images “Image resized to fit limits” logs) #33179

@vangelismosca

Description

@vangelismosca

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Bug report — agents/tool-images resize triggered by session:history in Control UI

Summary

In OpenClaw Control UI (webchat), log lines from agents/tool-images (Image resized to fit limits) are repeatedly emitted even when the user sends text-only messages and cron jobs are disabled.

Evidence indicates the trigger is session:history refresh/poll behavior in the UI, not user input and not cron job execution.

Environment

  • OpenClaw: 2026.3.2
  • OS: Windows 10.0.26200 x64
  • Channel: webchat (Control UI)
  • Model: openai-codex/gpt-5.3-codex

Reproduction steps

  1. Open Control UI webchat.
  2. Ensure no active cron job execution affecting the test (job disabled for isolation).
  3. Send only text messages (e.g., test-1, test-2).
  4. Tail logs:
    openclaw logs --follow --plain
  5. Observe periodic log lines:
    • subsystem: agents/tool-images
    • label: session:history
    • message: Image resized to fit limits ...

Key evidence

Example line observed during text-only phase:

2026-03-03T15:13:07.717Z info agents/tool-images {"subsystem":"agents/tool-images"} {"label":"session:history", ... } Image resized to fit limits: 1338x923px 70.0KB -> 50.5KB (-27.9%)

Additional confirmation:

  • With the job disabled, lines still appeared.
  • Closing Control UI tab for ~2 minutes caused those lines to stop.

This strongly suggests UI-driven session-history retrieval is causing reprocessing of historical images.

Expected behavior

  • agents/tool-images resize should not repeatedly run for historical image attachments during normal text-only chat activity.
  • History polling/refresh should avoid re-transforming unchanged historical images.

Actual behavior

  • Repeated resize logs for the same historical image(s), with label:"session:history", producing console noise and confusion.

Impact

  • Noisy logs
  • Misleading diagnostics (looks like new image processing while user sends text only)
  • User trust/UX degradation

Suggested fix directions

  1. Cache transformed history attachments by stable key (messageId + attachmentId + transform params).
  2. Skip transformation for already compliant assets on repeated session:history fetches.
  3. Add dedupe guard in history render/serialization path.
  4. Reduce log severity/rate for repeated identical resize operations.

Current workaround

  • /compact or session reset can reduce recurrence temporarily.
  • Closing the Control UI tab stops the repeated lines while closed.

Optional extra diagnostics (for maintainer)

  • Add trace IDs linking chat.history request -> agents/tool-images calls.
  • Log cache hit/miss reason when label=session:history.

Steps to reproduce

  1. Open OpenClaw Control UI (webchat).
  2. Keep cron job disabled (to isolate).
  3. Start log tail: openclaw logs --follow --plain.
  4. Send only text messages (e.g. test-1, test-2).
  5. Observe repeated log lines from agents/tool-images with label:"session:history" and message Image resized to fit limits ....
  6. Close the Control UI tab for ~2 minutes: the repeated lines stop.
  7. Reopen Control UI: repeated lines resume.

Expected behavior

When using Control UI with text-only messages, historical image attachments should not be repeatedly reprocessed. The logs should not continuously show agents/tool-images "Image resized to fit limits" for session:history unless new images are actually introduced.

Actual behavior

  • Repeated resize logs for the same historical image(s), with label:"session:history", producing console noise and confusion.

OpenClaw version

2026.3.2

Operating system

Windows 11

Install method

npm global

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crashstaleMarked as stale due to inactivity

    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