feat(mcp): inspect durable checkpoints - #8702
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit feb7a71. Configure here.
There was a problem hiding this comment.
UI consistency review found one environment-routing regression in the shared markdown renderer, plus a small dead-CSS addition. Details inline.
Posted via Macroscope — UI Consistency
|
Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds two new production MCP capabilities and roughly 1.3k lines of cross-layer logic for checkpoint metadata, filesystem-ref reads, provider rollback support, and paginated diffs. The operations are read-only and scoped, but the new server surface and agent preapproval behavior make this a substantial feature requiring human review. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Reviewed the new checkpoint MCP service, toolkit, and contracts against the Effect service conventions. Structure (namespace imports, inline Context.Service interface, exported make/layer, Service["Service"] typing, Layer.mock test seams) follows the existing WorktreeMcpService/OrchestratorMcpService pattern. One error-translation issue below.
Posted via Macroscope — Effect Service Conventions
Thread transfer impact
This comment will update automatically after the next completed run. |

Checkpoint metadata and diffs existed behind internal services, but coding agents could not discover or inspect a durable restore target through MCP.
This adds bounded
t3_checkpoint_listandt3_checkpoint_difftools scoped to the caller's current project. Results expose stable scope/source identity, per-checkpoint availability and restore support, bounded file summaries, and UTF-16-safe diff cursors without duplicating checkpoint storage.Behavior:
Focused validation:
tools/listroot-object schema coverageDependency: bottom layer of native stack #8713, rooted on
agents/mcp-controls/base-490318aat the agreed V2 pin.Implemented by GPT-5.6-Sol via Codex in T3 Code.
Note
Add
CheckpointMcpServicewitht3_checkpoint_listandt3_checkpoint_diffMCP toolscheckpointRollbackAppRunOrdinalhelper in checkpointMcp.ts and orchestrationV2.tsmcp__t3-code__t3_checkpoint_listandmcp__t3-code__t3_checkpoint_diffviaCLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS; the read-only tool aggregation test in ClaudeAdapterV2.test.ts must includeCheckpointToolkitMacroscope summarized 9889acb.
Note
Medium Risk
Read-only MCP surface, but it reads full thread projections and workspace refs with restore-advisory logic tied to provider rollback semantics; incorrect rollback ordinal resolution could mislead agents about restore eligibility.
Overview
Adds
t3_checkpoint_listandt3_checkpoint_diffso agents can inspect durable workspace checkpoints over MCP without mutating state. A newCheckpointMcpServiceloads thread projections viaThreadManagementService, enforces orchestration capability and same-project thread boundaries, and talks toCheckpointStoreonly for the paginated slice.List returns newest-first checkpoints with bounded file summaries, per-entry ref availability (failures isolated so one bad ref does not break the page), and
restoreSupportblockers derived from thread/run state, provider capabilities, andcheckpointRollbackAppRunOrdinal. Diff validates thread/scope/checkpoint identity before reading refs or returning an empty patch, then serves UTF-16-safe paginated diff text.Shared contracts live in
checkpointMcp.ts; tools register on the HTTP MCP server with read-only annotations, UI presentation labels, and Claude sandbox allowlist entries.checkpointRollbackAppRunOrdinaltreats null app ordinals as thread start only for ordinal-zero root scopes—materialized baselines and manual scopes surfacerollback_target_ambiguousinstead of implying restore. Docs and tests cover contracts, service behavior, MCPtools/list, and capture scenarios for materialized baselines.Reviewed by Cursor Bugbot for commit 9889acb. Bugbot is set up for automated code reviews on this repo. Configure here.