Skip to content

feat(message): list chat / list messages should support pagination instead of hardcoded 25 limit #71452

Description

@JerryTao-AI

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions