Fixed: MEAI001 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only
I turned on background responses for a Microsoft Agent Framework agent and polled with its continuation token, and the build failed with four errors like error MEAI001: 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only and is subject to change or removal in future updates. Both continuation token properties are experimental in Agent Framework 1.28.0. Suppressing MEAI001 around the code that uses them fixed the build.
What I Was Doing
I was building a .NET 10 console app whose Microsoft Agent Framework agent writes bedtime stories for children, with Microsoft.Agents.AI.Foundry 1.28.0-preview.261106.1 (which brings in Microsoft.Agents.AI 1.28.0) and Azure.Identity 1.21.0. The agent runs on a model deployment in a Microsoft Foundry project.
A story of about 1,500 words takes the model a while to write, so I used background responses. The documentation of AllowBackgroundResponses explains what turning it on does: When this property is set to true, non-streaming APIs may start a background operation and return an initial response with a continuation token. The app then asks again with that token until a response comes back without one, which means the story is complete.
using System.Diagnostics;
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
AIAgent agent = new AIProjectClient(
new Uri("https://foundry-devblogs-exp.services.ai.azure.com/api/projects/proj-devblogs-exp"),
new AzureCliCredential())
.AsAIAgent(
model: "gpt-5.6-luna",
instructions: "You write bedtime stories for children. Use plain text, without Markdown.",
name: "StoryTime");
// 1. Let the service work on the answer in the background.
AgentRunOptions options = new() { AllowBackgroundResponses = true };
AgentSession session = await agent.CreateSessionAsync();
Stopwatch clock = Stopwatch.StartNew();
AgentResponse response = await agent.RunAsync(
"Write a bedtime story of about 1,500 words about a lighthouse keeper's cat.", session, options);
Console.WriteLine($"[{clock.Elapsed.TotalSeconds:0.0} s] First answer: {Describe(response)}");
// 2. Ask again with the token until there is no token: then the answer is complete.
while (response.ContinuationToken is not null)
{
await Task.Delay(TimeSpan.FromSeconds(2));
options.ContinuationToken = response.ContinuationToken;
response = await agent.RunAsync(session, options);
Console.WriteLine($"[{clock.Elapsed.TotalSeconds:0.0} s] Poll: {Describe(response)}");
}
string story = response.Text;
Console.WriteLine($"The story has {story.Split(' ', StringSplitOptions.RemoveEmptyEntries).Length} words. It starts:");
Console.WriteLine(story[..Math.Min(story.Length, 200)]);
static string Describe(AgentResponse response) =>
response.ContinuationToken is null
? $"no token, {response.Text.Length} characters of text"
: $"a continuation token, {response.Text.Length} characters of text";
What each part does:
new AIProjectClient(...)connects to the Microsoft Foundry project at that endpoint.AzureCliCredentialsigns in with the account the Azure CLI is signed in to..AsAIAgent(...)creates the agent from a model deployment, its instructions and a name. Use your own project endpoint and model deployment.AllowBackgroundResponses = truelets the service work on the answer in the background.- The first
RunAsynccall sends the question, with the session and the options.Describesays whether a response has a continuation token and how many characters of text it has, and theStopwatchadds the seconds since the start. - The
whileloop waits 2 seconds, copies the response's token intooptions.ContinuationTokenand callsRunAsyncagain in the same session, untilresponse.ContinuationTokenisnull. - The last lines print how many words the story has and its first 200 characters.
What I Expected
A successful build, then a first answer with a token, a few polls and the whole story. AllowBackgroundResponses and the two ContinuationToken properties are public parts of Microsoft.Agents.AI.Abstractions 1.28.0, which the Foundry package brings in. The documentation of AgentResponse.ContinuationToken describes this loop: you pass the token to AgentRunOptions.ContinuationToken on the next call, and If the response has completed and the result has been obtained, the token will be null. Microsoft's page on background responses shows the same loop in its C# example.
What I Got
dotnet run
/Users/you/source/StoryTime/Program.cs(24,8): error MEAI001: 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
/Users/you/source/StoryTime/Program.cs(27,5): error MEAI001: 'Microsoft.Agents.AI.AgentRunOptions.ContinuationToken' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
/Users/you/source/StoryTime/Program.cs(27,33): error MEAI001: 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
/Users/you/source/StoryTime/Program.cs(37,5): error MEAI001: 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
The build failed. Fix the build errors and run again.

dotnet run builds the app before it runs it, so nothing ran, and the command ended with exit code 1. Each error gives a line and a column in Program.cs:
| Where | Code there | Property |
|---|---|---|
| Line 24, column 8 | response.ContinuationToken in the loop's condition | AgentResponse.ContinuationToken |
| Line 27, column 5 | options.ContinuationToken, which the loop sets | AgentRunOptions.ContinuationToken |
| Line 27, column 33 | response.ContinuationToken, on the same line | AgentResponse.ContinuationToken |
| Line 37, column 5 | response.ContinuationToken inside Describe | AgentResponse.ContinuationToken |
Line 15, which sets AllowBackgroundResponses, got no error.
What I Checked
What the message means. It's the C# compiler's message for an API marked with the Experimental attribute, reported under the diagnostic ID the attribute gives, here MEAI001. The C# documentation on these diagnostics says what to do about one: If you're consuming an API marked with System.Diagnostics.CodeAnalysis.ExperimentalAttribute, suppress a valid reported diagnostic ID only when you accept that the API can change or be removed. Use #pragma warning disable or add the ID to <NoWarn> in your project file.
Which members are experimental. I read the attributes of the background response members with .NET reflection, from the compiled assemblies this app uses: Microsoft.Agents.AI.Abstractions 1.28.0 and Microsoft.Extensions.AI.Abstractions 10.11.0.
AgentResponse.ContinuationToken: markedExperimental, with the IDMEAI001.AgentRunOptions.ContinuationToken: markedExperimental, with the IDMEAI001.AgentRunOptions.AllowBackgroundResponses: not marked.AgentResponseUpdate.ContinuationToken, the token on each update of a streamed response: not marked.ResponseContinuationToken, the tokens' own type: not marked.
That matches the four errors exactly: every use of the two marked properties, and nothing else.
What Microsoft's documentation shows. The C# example on Microsoft's page on background responses uses the same three properties the same way: it sets AllowBackgroundResponses, then loops while response.ContinuationToken isn't null, setting options.ContinuationToken on each pass. The page doesn't mention MEAI001 or a suppression, and neither does the documentation of the properties in the package.
Whether MEAI001 is only about these properties. It isn't. Experimental APIs in Microsoft.Extensions.AI report the same ID, such as ToolApprovalRequestContent.RequiresConfirmation and AIFunctionNameAttribute (both under Related below).
Why It Happens
In Agent Framework 1.28.0, AgentResponse.ContinuationToken and AgentRunOptions.ContinuationToken are marked experimental, with the diagnostic ID MEAI001. The compiler reports an error for every use of an experimental API until you suppress its ID, which is how you accept that the API can change or be removed. AllowBackgroundResponses isn't marked, so turning background responses on builds. Polling is what needs the tokens: you read the token from the response and pass it back through the options.
The Fix
Suppress MEAI001 only around the code that uses the tokens, with a comment that says why. Two places use them: the polling loop, and Describe at the end of the file.
// 2. Ask again with the token until there is no token: then the answer is complete.
// Continuation tokens are experimental in Agent Framework 1.28 (MEAI001).
#pragma warning disable MEAI001
while (response.ContinuationToken is not null)
{
await Task.Delay(TimeSpan.FromSeconds(2));
options.ContinuationToken = response.ContinuationToken;
response = await agent.RunAsync(session, options);
Console.WriteLine($"[{clock.Elapsed.TotalSeconds:0.0} s] Poll: {Describe(response)}");
}
#pragma warning restore MEAI001
#pragma warning disable MEAI001
static string Describe(AgentResponse response) =>
response.ContinuationToken is null
? $"no token, {response.Text.Length} characters of text"
: $"a continuation token, {response.Text.Length} characters of text";
#pragma warning restore MEAI001

What the new lines do:
#pragma warning disable MEAI001stops the compiler from reportingMEAI001, and#pragma warning restore MEAI001turns it back on. The C# reference explains where each one applies: Thedisabletakes effect beginning on the next line of the source file. The warning is restored on the line following therestore.- The comment says why the suppression is there, so whoever reads the code later knows what it accepts.
Describe needs its own pair because it sits at the end of the file, outside the first pair, and its body reads response.ContinuationToken. Calling it on line 21 needs no suppression, because the call doesn't use the property itself, and that line got no error. Line 15, which sets AllowBackgroundResponses, stays as it was.
The whole file after the fix:
using System.Diagnostics;
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
AIAgent agent = new AIProjectClient(
new Uri("https://foundry-devblogs-exp.services.ai.azure.com/api/projects/proj-devblogs-exp"),
new AzureCliCredential())
.AsAIAgent(
model: "gpt-5.6-luna",
instructions: "You write bedtime stories for children. Use plain text, without Markdown.",
name: "StoryTime");
// 1. Let the service work on the answer in the background.
AgentRunOptions options = new() { AllowBackgroundResponses = true };
AgentSession session = await agent.CreateSessionAsync();
Stopwatch clock = Stopwatch.StartNew();
AgentResponse response = await agent.RunAsync(
"Write a bedtime story of about 1,500 words about a lighthouse keeper's cat.", session, options);
Console.WriteLine($"[{clock.Elapsed.TotalSeconds:0.0} s] First answer: {Describe(response)}");
// 2. Ask again with the token until there is no token: then the answer is complete.
// Continuation tokens are experimental in Agent Framework 1.28 (MEAI001).
#pragma warning disable MEAI001
while (response.ContinuationToken is not null)
{
await Task.Delay(TimeSpan.FromSeconds(2));
options.ContinuationToken = response.ContinuationToken;
response = await agent.RunAsync(session, options);
Console.WriteLine($"[{clock.Elapsed.TotalSeconds:0.0} s] Poll: {Describe(response)}");
}
#pragma warning restore MEAI001
string story = response.Text;
Console.WriteLine($"The story has {story.Split(' ', StringSplitOptions.RemoveEmptyEntries).Length} words. It starts:");
Console.WriteLine(story[..Math.Min(story.Length, 200)]);
#pragma warning disable MEAI001
static string Describe(AgentResponse response) =>
response.ContinuationToken is null
? $"no token, {response.Text.Length} characters of text"
: $"a continuation token, {response.Text.Length} characters of text";
#pragma warning restore MEAI001
Why Only Around These Lines
The C# documentation also allows adding the ID to <NoWarn> in the project file. That would accept every API that reports MEAI001, in every file of the project, including experimental APIs you start using later, without a word. With the pragmas, the acceptance covers only the lines that need it: a new use of an experimental API anywhere else still stops the build, so you decide about it when it happens. And when a later version removes the experimental mark, the pragmas show exactly what to delete.
After the Fix
dotnet run
[3.6 s] First answer: a continuation token, 0 characters of text
[7.2 s] Poll: a continuation token, 0 characters of text
[10.2 s] Poll: a continuation token, 0 characters of text
[13.1 s] Poll: a continuation token, 0 characters of text
[15.9 s] Poll: a continuation token, 0 characters of text
[18.8 s] Poll: a continuation token, 0 characters of text
[21.8 s] Poll: no token, 11015 characters of text
The story has 1734 words. It starts:
Marmalade and the Sleeping Sea
At the very edge of the world, where the land became a long gray finger reaching into the sea, stood a lighthouse called Bellweather.
It was a tall, round tower painte

The build succeeded and the app ran. The first answer came back after 3.6 seconds with a continuation token and no text: the service had started on the story in the background. Five polls, from 7.2 to 18.8 seconds, still got a token and no text. They came about 3 seconds apart: the 2-second wait plus the call itself. At 21.8 seconds the response had no token and 11015 characters of text, so the story was complete.
The app counted 1734 words by splitting the text at spaces, and printed the first 200 characters, which is why the last line stops in the middle of a word.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Adding MEAI001 to <NoWarn> in the project file | Every API that reports MEAI001 builds without a word, in every file | Suppress it around the lines that use the tokens |
#pragma warning disable without an ID | All warnings are turned off, not only MEAI001, until a restore | Name MEAI001, and restore it after the last line that needs it |
| Wrapping only the loop | The error for the use inside Describe is still reported | Wrap every place the errors point at |
Reading response.Text right after the first call | With background responses on, the first answer had a token and 0 characters of text | Poll until ContinuationToken is null, then read the text |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
error MEAI001: 'Microsoft.Agents.AI.AgentResponse.ContinuationToken' is for evaluation purposes only | The code reads a response's continuation token | Put #pragma warning disable MEAI001 before it and #pragma warning restore MEAI001 after it |
error MEAI001: 'Microsoft.Agents.AI.AgentRunOptions.ContinuationToken' is for evaluation purposes only | The code sets the token on the run options | The same pair around that line |
MEAI001 is still reported after adding the pragmas | A use outside the lines between them | Check the line and column of each error, and move the pragmas so they cover it |
| The first answer has a continuation token and no text | The service is still working on the answer in the background | Keep polling with the token until it's null |
FAQ
Why doesn't turning on background responses need the suppression?
AllowBackgroundResponses isn't marked experimental in Agent Framework 1.28.0. Only the two token properties are, so line 15 built without an error, before and after the fix.
Do I need the suppression when I stream the response?
Reading the token from each update of a streamed response uses AgentResponseUpdate.ContinuationToken, which isn't marked experimental in 1.28.0. To resume an interrupted stream, though, you pass that token to AgentRunOptions.ContinuationToken, the same property that reported the error at line 27 here, so that line needs the suppression.
Is it safe to use the continuation tokens?
They work, as the run above shows, and they can change or be removed in a later version: that's what suppressing the diagnostic accepts. With the uses in two marked places, a change touches only those lines.
Will the error go away by itself?
When a later version removes the experimental mark, the properties stop reporting MEAI001, and the pragmas have nothing left to do. You can delete them then.
Conclusion
MEAI001 on AgentResponse.ContinuationToken and AgentRunOptions.ContinuationToken means the continuation tokens that background responses use are experimental in Microsoft Agent Framework 1.28.0. Turning background responses on builds; reading and passing the token is what reports the error. Suppress MEAI001 with #pragma warning disable and restore around the lines that use the tokens, with a comment that says why, and keep it out of the project file, so every other experimental API still has to be accepted where it's used.
Additional Resources
- Agent Background Responses, on Microsoft Learn: continuation tokens, polling and resuming a stream.
- Resolve errors and warnings for language features and versions, on Microsoft Learn: what to do about an experimental API.
- C# preprocessor directives, on Microsoft Learn:
#pragma warning disableandrestore.
Related
Other experimental APIs report the same kind of error:
- Fixed: MEAI001 'Microsoft.Extensions.AI.ToolApprovalRequestContent.RequiresConfirmation' is for evaluation purposes only
- Fixed: MEAI001 'Microsoft.Extensions.AI.AIFunctionNameAttribute' is for evaluation purposes only
- Fixed: MAAI001 'Microsoft.Agents.AI.RoutePersistingRoutingChatClient' is for evaluation purposes only
- Fixed: OPENAI001 'OpenAI.Embeddings.EmbeddingClient.EmbeddingClient(string, System.ClientModel.Primitives.AuthenticationPolicy, OpenAI.OpenAIClientOptions)' is for evaluation purposes only
