Skip to content

Investigate Chat image transport and historical image token usage #168

Description

@angnuoli

Background

Before adding image support to Chat, we need to define how images are transported between the Electron Renderer, Main Process, OpenClaw Gateway, and the model. We also need to determine whether images in conversation history cause large, repeated token usage.

Investigation

  • Confirm the image input formats currently supported or recommended by OpenClaw: local file paths, Base64/Data URLs, binary attachments, or remote URLs.
  • Compare the options in terms of cross-process transport, security boundaries, payload size, compatibility, and performance.
  • Determine how historical multimodal messages are stored and reintroduced into context, including whether images are re-encoded or billed again on every turn.
  • Investigate whether OpenClaw already provides image compression, resizing, caching, reference reuse, history trimming, or summarization.
  • Recommend an implementation approach for MicroClaw and identify any required upstream changes or follow-up development tasks.

Completion criteria

  • Document a clear transport format decision and its technical rationale.
  • Explain the actual token behavior of historical images and any existing optimization mechanisms.
  • If high token usage remains, propose an actionable optimization and a way to validate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions