Skip to content

v1.98.1

@cjimti cjimti tagged this 05 Jul 07:17
Adopt the MCP 2026-07-28 explicit-handle pattern (SEP-2567): platform_info
mints a dps_-prefixed session_id that the model threads as an ordinary
argument on every subsequent tool call, replacing reliance on the
transport-level Mcp-Session-Id header the spec is removing.

- pkg/session/handles.go: handle format, GenerateHandle, IsHandle, MintHandle
  (records user_id, persona, minted_by marker in the session store).
- platform_info mints the handle and returns session_id + session_expires_at,
  prepending a threading instruction to the agent instructions.
- SessionResolver in MCPToolCallMiddleware extracts, validates (exists,
  unexpired, same identity), strips, and adopts the handle onto
  pc.SessionID; MCPSessionHandleSchemaMiddleware advertises session_id on
  every tool except platform_info. Gates, audit, and provenance key on the
  deliberate handle with no re-keying.
- Config sessions.handles (enabled/ttl/require, default-on) and a
  mcp_session_resolution_total{source} migration metric.
- Explicit handles supersede the legacy transport-keyed session_gate,
  carrying its exempt_tools forward.

Hardening: only a dps_-prefixed value is consumed so a proxied tool's own
session_id survives; fail-open on session-store errors (matching the
search-first gate); platform_info is exempt from handle validation so a
stale threaded handle cannot block the recovery call; number-precision-safe
arg re-encode; throttled refresh-on-use.

Covered by unit tests and a real-assembled-chain integration test
(mcp.Server + full middleware + in-memory transport).
Assets 2
Loading