MemoryLake
Back to all articles
TutorialJune 5, 20266 min read

Your MCP Task Survives a Restart — But Does It Remember Anything?

The MCP Tasks extension, part of the 2026-07-28 specification release candidate, changes how long-running work behaves: instead of blocking a connection, a server returns a durable task handle, and the client drives it with `tasks/get`, `tasks/update`, and `tasks/cancel`. If the client disconnects or restarts, it resumes polling with the same task ID. That's real crash resilience for the lifecycle — but a task handle only restores the state machine, not the knowledge the task accumulated. This guide shows you how to give MCP Tasks long-term memory so a resumed task recalls its full context, not just its place in line.

The short answer

A task handle gives you crash-resilient control over long-running MCP work, but it doesn't store what the task learned. To give MCP Tasks long-term memory, write the task's context to an external layer: create a MemoryLake Project, generate an MCP Server endpoint, and have the task read and write context through it — so a resumed task recovers both its handle and its memory.

Why a task handle isn't memory

The Tasks extension (which moved from an experimental core feature in 2025-11-25 to an extension after production feedback) solves a transport problem: long operations no longer tie up a connection or hit gateway timeouts, and a durable task ID lets a client reconnect and keep polling. That's exactly what long-running agent work needed.

But durability of the handle is not durability of the context. When your task spends ten minutes researching, calling tools, and forming intermediate conclusions, that accumulated knowledge lives in process. Resume the task after a restart and you recover the handle — yet the facts it gathered, the decisions it made, and the user input it collected are gone unless you stored them somewhere. The clean pattern is to keep the task itself stateless and push its memory into an external layer it reads on resume. The Tasks extension handles where the task is; a memory layer handles what the task knows.

Before you start

You'll need:

  • A free MemoryLake account
  • An MCP server that advertises the Tasks extension (task support requires opt-in from both client and server)
  • The context the task should persist — intermediate results, rules, or files (PDF, Word, Excel, PowerPoint, text/Markdown, or images)

How to give MCP Tasks long-term memory (step by step)

Step 1: Build a memory Project

Sign in to MemoryLake and open Project Management. Click Create Project and name it (for example, "Long-running task memory"). Open the Document Drive, use Upload to add reference files, then Documents Tab → Add Documents → Confirm to attach them. Capture durable rules through the Memories Tab → Add Memory → Save.

Step 1: Build a memory Project
Step 1: Build a memory Project

Step 2: Generate an MCP Server endpoint

Open the MCP Servers Tab → Add MCP Server → describe it (for example, "Task context backend") → Generate. MemoryLake returns a Key ID, a Secret, and an Endpoint URL. Copy the Secret immediately — it's shown only once.

Step 2: Generate an MCP Server endpoint
Step 2: Generate an MCP Server endpoint

Step 3: Read and write task context through the endpoint

In your task's execution code, call the MemoryLake Endpoint URL with the Secret as a Bearer token to checkpoint context as the task progresses, and to read it back when a client resumes with tasks/get after a disconnect. Because memory lives outside the process, a resumed task — even on a different instance — recovers both its handle and everything it had learned. See the MCP setup guide for the configuration reference. [Try MemoryLake free]

Step 3: Read and write task context through the endpoint
Step 3: Read and write task context through the endpoint

Task handle alone vs Task + MemoryLake

DimensionTask handle aloneTask + MemoryLake
Resume after disconnectYes (same task ID)Yes
Recover accumulated contextNo (lost on restart)Yes
Works across server instancesHandle onlyHandle + full memory
Version control of contextNoYes (Git-style history)
Data ownershipIn-process, volatileYou own it (AES-256, durable)
BenchmarkLoCoMo #1 — 94.03%

Tips & best practices

  • Checkpoint context at meaningful steps, not every tick — write after a tool result or a decision, so a resumed task picks up at the last solid state.
  • Key memory by a stable identifier (the task's logical job, not the transient connection) so any instance resuming the task reads the right context.
  • Keep durable rules in Memory entries and bulk artifacts in the Document Drive — small rules read back fast on resume.
  • Read the Bearer token from shared config so every instance that can pick up the task authenticates the same way.

Troubleshooting

  • A resumed task acts like it forgot everything: confirm the task reads context back from the Endpoint URL on resume, not just the task handle from tasks/get.
  • Different instances see different context: key memory by the logical job, and point every instance at the same Project and Endpoint URL.
  • "Secret not found": the Secret is shown only once. Revoke the key and Generate a new one in the MCP Servers Tab.

Give long-running tasks a memory, not just a handle

Externalize task context once and a resumed MCP Task recovers everything it knew — not just where it left off.

Frequently asked questions

Does the MCP Tasks extension store task memory?

No. As of the 2026-07-28 release candidate, the Tasks extension gives you a durable handle to resume long-running work, but it doesn't persist the context a task accumulates. Store that in an external memory layer.

How do I make a long-running MCP task remember its context?

Write context to an external layer during execution. Generate a MemoryLake Endpoint URL and call it with the Secret as a Bearer token to checkpoint and recover context when the task resumes.

What's the difference between a task handle and task memory?

A task handle restores where the task is in its lifecycle so a client can resume polling. Task memory restores what the task learned — its facts and decisions — which a handle alone doesn't keep.

Does this work if the task resumes on a different server instance?

Yes. Because memory lives in MemoryLake and is keyed by the logical job, any instance that resumes the task reads the same context back over the authenticated endpoint.

Is MCP Tasks final yet?

The Tasks extension is part of the 2026-07-28 specification release candidate and requires opt-in from both client and server. Confirm host support before relying on it in production.

Is the stored context secure?

MemoryLake is AES-256 encrypted and certified to ISO 27001, SOC 2 Type II, GDPR, and CCPA. You own your data and can export or permanently delete it at any time.