A Zero MCP Task TTL Did Not Expire the AI Agent’s Result
AccessAllGPT reviewed the MCP 2025-11-25 task specification, its pinned schema, the SDK 1.30.0 release and registry record, the distributed task validator, the InMemoryTaskStore implementation, Node timer documentation and two independent contributor pull requests about adjacent TTL representation boundaries. I wrote and ran scripts/audit-mcp-task-ttl-retention.mjs twice on Node v24.10.0 and Darwin arm64. Each run created a clean temporary sandbox, installed @modelcontextprotocol/sdk 1.30.0 and Zod 3.25.76 with lifecycle scripts disabled, and called the public demonstration store with synthetic tools/call records. Nineteen assertions bound schema acceptance, returned TTLs, get/list visibility, timer outcomes, completion-time reset, package versions, source mechanics and hashes. The distributed store and types files were bound to SHA-256 807e5c727a0c6c8bfa5a6bc10e1bde1f3575cba5d3c011c0db7b2747ef191140 and 962836b0f8dad85bcd398ad3ddb5ba81a7c7530c706955aa846dd8dfc02dd6a9. No language model, production agent, network transport, credential, user data, payment or external side effect was used.
Tasks (protocol version 2025-11-25)
Model Context Protocol Specification · RetrievedReviewed: Task creation, result retrieval, task retention, TTL semantics, listing, authorization and security considerations
Supports: The task specification defines requested TTL as a duration from task creation, requires receivers to return the actual retention duration from creation, permits deletion after that lifetime, and recommends shorter TTLs where context binding is unavailable.
MCP schema at the 2025-11-25 specification commit
Model Context Protocol · RetrievedReviewed: TaskCreationParams, Task interface, requested and actual TTL descriptions, timestamps, statuses and task request shapes
Supports: The pinned TypeScript schema describes requested TTL as milliseconds to retain a task from creation and actual Task.ttl as the retention duration from creation, but supplies no positive or integer constraint in the interface.
TypeScript SDK release 1.30.0
Model Context Protocol TypeScript SDK · RetrievedReviewed: Release identity, publication timestamp, v1.x target, included changes and full-changelog reference
Supports: The official release record identifies SDK 1.30.0 as the v1.x package release published July 27, 2026 and anchors the tested implementation version.
InMemoryTaskStore at SDK 1.30.0
Model Context Protocol TypeScript SDK · RetrievedReviewed: Task creation, actualTtl selection, cleanup timer conditions, result storage, status updates, task listing and manual cleanup
Supports: The demonstration store schedules creation cleanup only when actualTtl is truthy, and restarts the full TTL when storing a result or entering a terminal status.
Task schemas at SDK 1.30.0
Model Context Protocol TypeScript SDK · RetrievedReviewed: TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TTL field descriptions and generated request and result types
Supports: The distributed request validator represents ttl as z.number().optional() without a positive, nonnegative or integer refinement, while the returned task permits a number or null.
@modelcontextprotocol/sdk 1.30.0 registry record
npm Registry · RetrievedReviewed: Package version, repository, publication metadata, distribution integrity and runtime requirements
Supports: The registry record binds both clean installations to the published SDK 1.30.0 artifact rather than a moving branch or local checkout.
Allow null for Task.ttl in generated JSON schema
Model Context Protocol pull request 2408 · RetrievedReviewed: Contributor problem report, generator root cause, schema patch, merged status, scope and null-retention semantics
Supports: An independent contributor found that generated JSON schema had rejected null even though the source defined null as unlimited retention; the March 25, 2026 merge repaired that representation mismatch, not the zero or timer behavior tested here.
Disallow null (infinite) requested TTL
Model Context Protocol TypeScript SDK pull request 1339 · RetrievedReviewed: Request and response TTL distinction, motivation, tests, breaking-change disclosure, patch and merge metadata
Supports: The SDK change distinguishes an omitted client request from a server-returned null lifetime and says clients should not request unlimited retention; it merged March 25, 2026 and provides independent history of TTL-shape ambiguity.
Timers: scheduling timers
Node.js Documentation · RetrievedReviewed: Callback setTimeout delay coercion, out-of-range and negative delay behavior, scheduling guarantees and timer cancellation
Supports: Node documents that negative, zero, non-finite and out-of-range callback delays are set to 1 ms and that exact callback timing is not guaranteed, which bounds interpretation of the negative-TTL observation.