Repository navigation
feat(mcp): add bounded paginated session discovery - #396
Merged
Merged
Conversation
This was referenced Nov 15, 2026
abruption
marked this pull request as ready for review
November 15, 2026 04:35
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
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.
Summary
Large session inventories can overwhelm MCP tool results. Add
list_sessions_pagefor one explicit, operator-approved destination and agent, while preserving the six existing tools and ordinary CLI discovery.listgrant and independent host approvals.ok=true,complete=false,isError=false) from sanitized refusals. Keep exact identities, including decimal Claude PID normalization, without claiming readiness, caller identity, target generation, consumption or ACK.Refs #393
Dependency integrated: support-fix PR #395 merged into
mainat0fc38ee0f3af7e34d86316902008d927c6f9f76b. This Draft now targetsmain; that base was merged into the feature branch without rewriting history. The Claude permission fixture retains the exact merged main version, including the readable-mode000 probe and its control regression.Type
Validation
8339657server/standalone source, separately per SDK, in addition to the bare-SDK dispatch fixture. This does not claim all possible native outputs are byte-identical; #394 intentionally corrects the unreadable-record false-success case.Coverage includes strict raw JSON/unknown arguments, Unicode identity/labels, single-row and full-envelope byte boundaries, partial/empty/error/nonzero evidence, unknown nested fields, all cursor/filter/policy/expiry/restart/eviction cases, 28-page delayed continuation with absolute lifetime, admission/cancellation cleanup and source-shaped Claude/Codex/Antigravity data. Actual Windows end-to-end runtime remains untested locally; its refusal test is left for CI.
Independent review
Fresh non-interactive read-only CLI reviews ran in parallel per round, with Claude tools disabled/plan/no persistence and Antigravity plan+sandbox/medium/600s timeout. Requested models matched response metadata; every call returned a substantive successful result and input hashes stayed unchanged. No model fallback occurred. These were supplied-source reviews, not independent execution of our tests.
claude-opus-5-5(216.979s), Antigravity 1.5.9 /gemini-4-argon-medium(44.845s); same 135,231-byte input SHA-256461f6bbc93d9cd528fd5f4bb3e671f8c6ea97676fe6ff7c8dd0910acb06ab769. Input included the complete MCP adapter/helper/new tests/fixtures, supporting cleanup/discovery excerpts and English docs. Codex source-checked the differing findings: fixed TTL usability, optional invalid-label handling, single-row admission, schema limits and conservative unknown-evidence handling. The actual upstream unreadable-Claude-record reproduction became separate support issue fix(discovery): report unreadable Claude records as incomplete #394 and its Draft.220ebee96deea60d519b34d6b0158dcabe62dd00a999fb268d1ba2a8be22dc04. Neither found a confirmed Draft blocker. Codex checked conditional findings: supported MCP deployment is the complete wheel/sdist/source checkout (plugin invokes the package entry point; standalone installer/self-update copies only the core CLI/skill), so an unsupported hand-copy of only the server module does not establish a supported-path regression. Post-processing timing, duplicate-ID semantics, the fix(discovery): report unreadable Claude records as incomplete #394 call graph and host-conditional native-tool wording were checked/documented.gemini-3.8-flash-medium, actual model confirmed, EN/KO/JA/ZH guide diffs. First packet 40,230 bytes / SHA-25603663136fa55c082fb0ad32191a944c498b2e0cc79a1b39a183aaa3cb9c9ab68(114.543s); updated packet 43,312 bytes / SHA-25672befecdb3a1bfc10735c5b099a0e65c186efb86a774ac47bea44b423385947d(96.471s). Numeric, permission, platform and unpublished-status boundaries matched. Codex restored explicit inspection/requirement wording and source-checked suggested terminology; literal jargon and ungrounded claims were not adopted.After these reviews, production code stayed unchanged. An actual-Windows-only no-platform-patch refusal regression was added (not run on Mac/Linux), and small final documentation clarifications cover synchronous post-processing, field-level omission, conditional native-tool availability and the translation instructions. These final test/copy refinements passed local checks but did not receive a third model review. The source reviews do not certify arbitrary native/remote environments or a machine-wide sandbox boundary.
Scope and remaining gates
This Draft prepares the optional MCP feature for review. The source keeps the v1.5.0 base version until separate release preparation; this source candidate is not the immutable published v1.5.0 package. No merge, release, deployment, global installation or host-permission change is included.
The new collection path is macOS/Linux only; Windows refuses before collection. Captured-byte and execution limits do not bound all upstream SQLite/filesystem work, escaped remote processes, RSS or OS scheduling; cleanup has its existing separate budget. TTL eviction is lazy, and cache accounting is serialized charge rather than a process-memory guarantee. Existing operator SSH configuration and CLI advisories can run; no new native version/model/send/wake probe is added. A snapshot does not reserve a route or later send.
Paired aggregation remains separately tracked in #367. Its isolated candidate reproduced sidecar recreation during a concurrent last-SQLite-owner close, so it is excluded from this change and the planned release scope. Its failing regression is preserved; the #393 source does not include that implementation.
Main synchronization — 2026-11-15
Merge commit
91fad6935cdcacb8b0c8f6113548bc981504a1earesolves the add/add conflict intests/adapters/test_claude_read_errors.pyafter #395 was squash-merged. The resolved file is byte-identical to main. MCP production files remain byte-identical to the preceding feature HEAD; the feature-only diff against main still has the same 18 files. Each supported SDK ran 38 relevant tests: 37 passed and the actual-Windows-only test was skipped on Mac. Generator and whitespace checks passed. Current-head hosted checks must complete again.