MCP: lift replay-log fidelity above 8 KB #175

Open
opened 2026-05-13 16:28:22 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-13 16:28:22 +00:00 (Migrated from github.com)

Follow-up to PR #157 (the MCP CRIT design call). Today's fix removed the redundant inner 8 KB cap in ToolResultPacker.pack and made the MCP dispatcher's SanitizeForModel.prepareForBoundary(_, capBytes: 8192) the sole cap site. The replay log now sees the same 8 KB-capped bytes the model sees.

The audit's full intent was: dispatchers return raw bytes → replay log gets the full blob → model boundary caps at 8 KB. Achieving that requires moving SanitizeForModel out of MCP into a shared module so AgentCore and MCP can both depend on it without a cycle.

Schedule with M-3 Diagnostics surface work (v0.5) since that already plans to typed-ify replay queries.

Refs PR #157.

Follow-up to PR #157 (the MCP CRIT design call). Today's fix removed the redundant inner 8 KB cap in `ToolResultPacker.pack` and made the MCP dispatcher's `SanitizeForModel.prepareForBoundary(_, capBytes: 8192)` the sole cap site. The replay log now sees the same 8 KB-capped bytes the model sees. The audit's full intent was: dispatchers return raw bytes → replay log gets the full blob → model boundary caps at 8 KB. Achieving that requires moving `SanitizeForModel` out of `MCP` into a shared module so `AgentCore` and `MCP` can both depend on it without a cycle. Schedule with M-3 Diagnostics surface work (v0.5) since that already plans to typed-ify replay queries. Refs PR #157.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#175