fix(outlook): bound message pagination and payloads - #467
Open
zhouzhuozhzh-maker wants to merge 1 commit into
Open
fix(outlook): bound message pagination and payloads#467zhouzhuozhzh-maker wants to merge 1 commit into
zhouzhuozhzh-maker wants to merge 1 commit into
Conversation
lwxyfer
added a commit
to lwxyfer/openworker
that referenced
this pull request
Aug 9, 2026
lwxyfer
added a commit
to lwxyfer/openworker
that referenced
this pull request
Aug 10, 2026
zhouzhuozhzh-maker
force-pushed
the
codex/fix-465-outlook-pagination
branch
from
August 12, 2026 08:04
a891a91 to
f209513
Compare
Author
|
Hi @rohitprasad15 — this is ready for review and is the only open PR currently linked to #465. I rebased it onto the latest
The new GitHub Actions run is marked The implementation keeps Graph pagination inside the connector, bounds results, rejects off-origin next links, and separates message summaries from full-body retrieval. Happy to address any review feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Outlook message search silently capped requests at 20 items, exposed an opaque Microsoft Graph next link that the agent could not consume, and returned full message payloads. Larger inbox queries could therefore trigger repeated overlapping searches and exhaust the model context window.
Solution
returned_count,has_more, andquery_completemetadataoutlook_get_messageso the agent can fetch one selected message body without loading every bodyWhy this approach
Pagination belongs to the connector because Graph next links are opaque implementation details and may carry credentials through request headers. Keeping them away from the model prevents unsupported pagination loops. Splitting list and detail payloads also bounds context usage while preserving access to complete message content.
Verification
.venv/bin/pytest tests/test_connectors.py -k outlook -q— 7 passed.venv/bin/pytest -q— 1176 passed, 1 skippedgit diff --check origin/main...HEAD— cleanRisk and compatibility
The existing
account,ok,data, anddata.valueresponse structure remains available. Search results now contain summaries rather than bodies; callers can retrieve a full message through the new read-only tool. Pagination and returned data are bounded, and credentials are never forwarded to a non-Graph origin.Fixes #465