Skip to content

[Bug]: Hardcoded 5MB media store limit blocks generated/outbound media before configured channel limits apply #66229

@vbrisan

Description

@vbrisan

Bug type

Incorrect behavior

Summary

OpenClaw appears to enforce a hardcoded 5MB media store/staging limit before channel or agent-level media limits can apply.

In the installed runtime bundle, the hardcoded limit is in:

  • dist/store-CA7OW_2w.js

with:

const MEDIA_MAX_BYTES = 5 * 1024 * 1024;

This caused a generated video to fail with:

Media exceeds 5MB limit

Even though media delivery and channel/media configuration suggest larger payloads may be supported downstream.

Steps to reproduce

  1. Configure or use a workflow that generates media larger than 5MB, for example a generated video.
  2. Ensure the downstream channel or agent config would otherwise allow larger media.
  3. Attempt to return or stage that media through the normal OpenClaw media/tool pipeline.

Expected behavior

One of the following should happen:

  • the effective media limit should be derived from channel/agent config
  • the store/staging layer should have its own documented config knob
  • or the error should clearly explain that a separate hard global staging limit is being enforced

Configured media size allowances should not be silently undermined by a lower hardcoded cap earlier in the pipeline.

Actual behavior

Media fails early with:

Media exceeds 5MB limit

This appears to happen in the media store/runtime layer before downstream configured media limits can be meaningfully applied.

OpenClaw version

2026.4.11

Operating system

Ubuntu 24.04

Install method

npm global

Model

openai-codex/gpt-5.4

Provider / routing chain

OpenClaw media tool pipeline

Config file / key location

Not config-specific. Observed in the installed runtime bundle:

  • dist/store-CA7OW_2w.js

Additional provider/model setup details

Observed while generating video output. This is not specific to a single model provider, because the failure appears to occur in OpenClaw's own media store/staging layer.

Logs, screenshots, and evidence

Observed runtime error:

Media exceeds 5MB limit

Relevant installed runtime snippet:

const MEDIA_MAX_BYTES = 5 * 1024 * 1024;

Also observed that OpenClaw has other media limit resolution paths, including configurable channel/agent media max byte logic, which suggests this 5MB cap is an earlier hard ceiling rather than the only intended effective limit.

Impact and severity

This blocks generated or staged media workflows, especially video, and makes higher configured media limits ineffective or misleading.

Additional information

It would be helpful if this were fixed by one of these approaches:

  1. make the staging/store media limit configurable
  2. derive it from effective channel/agent media limits
  3. document it clearly as a separate hard cap and surface that in config/docs

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