You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): t3_thread_read returns the newest page to outside MCP clients - #41378
The t3_thread_read description says "Newest first", but a read without a cursor from an outside MCP client such as claude.ai (no calling thread, not a linked environment) returned the oldest items from position 0. Peer forwarding likewise asked older linked environments for the newest page only on behalf of agents.
Change
Every cursorless read now gets the newest page, and peer forwarding requests it for any caller. The t3 thread CLI, the one caller that relied on paging forward, now passes afterPosition: -1 explicitly.
Scope
A small fix for an obvious bug: the tool does not do what its description promises for outside clients.
Verification
Added an outside-client read to OrchestratorMcpService.activity.test.ts and a client read to PeerForwarding.test.ts. The CLI test's fake server now serves the newest page for cursorless reads. All three fail without the change and pass with it. src/mcp, src/cli and src/peer pass, apart from 6 environment-dependent CLI tests that also fail on main.
Model: Claude Opus 5.5 (claude-opus-5-5). Harness: Claude Code, run from T3 Code.
…ients
t3_thread_read is documented as newest first, but a cursorless read from an
outside MCP client such as claude.ai (no calling thread, not a linked
environment) paged forward from position 0. Every cursorless read now gets
the newest page, including reads forwarded to older linked environments.
The t3 thread CLI passes afterPosition -1 to keep paging forward.
Reviewing files that changed from the base of the PR and between 3c48ed6 and d02056a.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Cursorless thread reads now select the newest page across caller scopes, including forwarded reads. CLI reads send explicit pagination cursors, and cursorless local timeline reads return the newest matching items.
readThread now selects newest-first pages for cursorless reads regardless of caller scope. Tests check the outside-client newest page and retain forward-pagination checks for an unlinked CLI caller.
Cursorless thread reads from outside MCP clients, including reads forwarded to older linked environments, now return the newest page as the tool description promises. The CLI sends explicit cursors, so its forward paging is unchanged. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: t3_thread_read now returns the newest page to outside MCP clients. It follows conventional commit style, is one sentence, and matches the changeset and PR objectives.
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The problem is stated with reproduction context (outside MCP client without a thr…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The problem is stated with reproduction context (outside MCP client without a thread link). The change explains cursorless reads and peer forwarding, plus the CLI adjustment. Scope justifies the lack of a linked issue as a small obvious bug fix. Verification lists the added tests, pre-fix failures, and a test run with known failures. It also names the model and harness as the template asks. Minor gap: no linked issue is given, though the template allows a justification for small fixes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Created four Replay turns on fresh databases, authorized an outside read-only OAuth MCP client, and compared cursorless limit:2 reads with explicit newest reads. Also read an older page and paginated forward through all eight messages. Real servers and web browser, 1280×800; the labelled inspector shows actual /mcp responses.
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
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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
The
t3_thread_readdescription says "Newest first", but a read without a cursor from an outside MCP client such as claude.ai (no calling thread, not a linked environment) returned the oldest items from position 0. Peer forwarding likewise asked older linked environments for the newest page only on behalf of agents.Change
Every cursorless read now gets the newest page, and peer forwarding requests it for any caller. The
t3 threadCLI, the one caller that relied on paging forward, now passesafterPosition: -1explicitly.Scope
A small fix for an obvious bug: the tool does not do what its description promises for outside clients.
Verification
Added an outside-client read to
OrchestratorMcpService.activity.test.tsand a client read toPeerForwarding.test.ts. The CLI test's fake server now serves the newest page for cursorless reads. All three fail without the change and pass with it. src/mcp, src/cli and src/peer pass, apart from 6 environment-dependent CLI tests that also fail on main.Model: Claude Opus 5.5 (
claude-opus-5-5). Harness: Claude Code, run from T3 Code.