Repository navigation
feat(mcp): read back thread pin, archive and auto-settle state - #15
Merged
Merged
Conversation
API-14: MCP agents can see a thread's pin, archive, and auto-settle state and can list archived threads. t3_thread_list gains an `archived` input that switches listProjectThreads to the archive location; list items and thread detail now carry `pinned`, `archived`, and `autoSettle`. Read-only; no reorder (the pinned block merges environments, so no server-side order). Gate: 322 tests pass across AgentContextBudget, thread handlers, OrchestratorMcpService(.activity), ThreadManagementService, and the ClaudeAdapterV2 allowlist parity test; server + contracts typecheck clean; mcpToolListJsonBytes 62116 (ceiling 65366).
samnab
added a commit
that referenced
this pull request
Nov 1, 2026
Brings fork PRs #15-#26 (MCP read-back and agent tooling) onto dev, which already carries upstream 15fe283. Resolutions: - ThreadManagementService: list archived threads (origin) and keep the side-chat / isListedThreadLineage filter (upstream). - PeerMcpClient: keep undeclared-argument preflight via startSession (origin) and store the session before the first call so it outlives a waiting or cancelled request (upstream pingdotgg#26567); statusFailure covers 401/403/other. - PeerMcpClient.test (add/add): both suites kept; upstream's scripted renew test now accounts for the tools/list discovery request. - PeerForwarding.test, linkOrigin.test: both new mocks kept, grouped in one Layer.mergeAll to stay within pipe's 20-argument limit. - OrchestratorMcpService.activity.test: Effect.succeedSome per upstream lint rule. - agentContextBudget.json: measured values after merge. - No migrations added by origin/dev; no references to renamed symbols. Checks: vp run typecheck clean in apps/server, packages/contracts, packages/shared, packages/client-runtime, apps/web, apps/mobile. vp test run ThreadManagementService.test, src/mcp, src/peer, src/persistence, AgentContextBudget.test: 67 files, 570 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
MCP agents could pin, snooze, settle and archive threads but could not read back pin or auto-settle state, and had no way to find archived threads.
t3_thread_listitems gainpinned,archivedandautoSettle;t3_thread_readdetail gainspinnedandautoSettle.t3_thread_listacceptsarchived: trueto list archived threads (existinggetShellSnapshot({ location: "archive" })path). Default stays active threads; the otherlistProjectThreadscaller is unchanged.Tool list: 61,993 → 62,116 bytes (ceiling 65,366). Gate: 322 tests across the budget, MCP service, thread handler, ThreadManagementService and ClaudeAdapterV2 files; server and contracts typecheck clean. Fresh Claude Opus review: APPROVE (67/67 re-run). Known limit: an older linked peer ignores
archivedand returns active threads; non-empty replies fail with the existing "update both environments" error, empty ones read as none.Implemented with GLM-5.3-Flash via Pi; reviewed with Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code