openclaw - 💡(How to fix) Fix feat(message): list chat / list messages should support pagination instead of hardcoded 25 limit [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71452Fetched 2026-04-26 05:12:37
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1
RAW_BUFFERClick to expand / collapse

Problem

renderMessageList in message-format truncates results with .slice(0, 25), so message(action=read) and message(action=list-pins) can never return more than 25 items regardless of what the user requests.

Similarly, the channel-list action for MS Teams chats may also be limited.

Expected Behavior

  • The limit parameter from the tool call should be respected and passed through to both the Graph API fetch and the rendering layer.
  • Support pagination (e.g. before/after cursor or pageToken) so callers can iterate through all messages/chats.
  • The .slice(0, 25) cap in renderMessageList should either be removed or made configurable via the limit param.

Location

  • dist/message-format-BOXIwUK_.js line 75: messages.slice(0, 25)
  • MS Teams provider: Graph API calls for /chats and /messages may also need $top / @odata.nextLink pagination support.

Requested by

Ray Zhong (via Teams group chat, 2026-04-25)

extent analysis

TL;DR

Remove or make the .slice(0, 25) cap in renderMessageList configurable via the limit parameter to respect the user's requested limit.

Guidance

  • Identify and modify the renderMessageList function in dist/message-format-BOXIwUK_.js to remove the hardcoded limit or make it configurable.
  • Update the Graph API calls for MS Teams provider to support pagination using $top and @odata.nextLink parameters.
  • Consider adding support for pagination using before/after cursor or pageToken to allow callers to iterate through all messages/chats.
  • Verify that the limit parameter is being passed correctly from the tool call to the rendering layer.

Example

// Example of making the limit configurable
function renderMessageList(messages, limit) {
  return messages.slice(0, limit);
}

Notes

The current implementation may not support pagination, so additional work may be required to add this functionality. The MS Teams provider may also require updates to support pagination.

Recommendation

Apply workaround by modifying the renderMessageList function to respect the limit parameter, as removing the hardcoded limit or making it configurable is a more targeted solution than upgrading to a potentially non-existent fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING