Skip to content

.NET: [Bug]: Provided Human in the loop sample does not seem to work anymore with RC1 #4144

Closed

Description

Description

In the repo, you have https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic

Which is a Human in the Loop sample... This seems not to work anymore with RC1 (If you guess a number, the sample just ends with no feedback or giving user the option to retry)

I also have a similar Sample here: https://github.com/rwjdk/MicrosoftAgentFrameworkSamples/blob/main/src/Workflow.HumanInTheLoop/Program.cs , and there I just get a very un-descriptive error of

System.InvalidOperationException: 'Executor 'Evaluator and Hint-giver' cannot send messages of type 'FeedbackToUser'.'
Image

when run... This sample worked flawlessly pre RC1

Any hints as to what is going on here?

Code Sample

Error Messages / Stack Traces

Package Versions

RC1

.NET Version

.NET10

Additional Context

No response

Activity

  1. added
    bugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)
    .NETUsage: [Issues, PRs], Target: .Net
    on Feb 21, 2026
  2. codehunter13 commented on Feb 22, 2026

    @codehunter13

    think i got the same error in my application. Also worked previously (with the change i converted it to the [MessageHandler] way).

    System.InvalidOperationException: Executor 'CodeGenerationOrchestrator' cannot send messages of type 'GSL.Dev.Agents.Executors.CodeGeneration.ReviewRequest'.
       at Microsoft.Agents.AI.Workflows.InProc.InProcessRunnerContext.SendMessageAsync(String sourceId, Object message, String targetId, CancellationToken cancellationToken)
       at GSL.Dev.Agents.Executors.CodeGeneration.CodeGenerationOrchestrator.HandleAsync(TestGenerationResult testResult, IWorkflowContext context, CancellationToken cancellationToken) in D:\projects\CodingAgent\GSL.Dev.Agents\Executors\CodeGeneration\CodeGenerationOrchestrator.cs:line 117
       at Microsoft.Agents.AI.Workflows.RouteBuilder.<>c__DisplayClass12_0`1.<<AddHandler>g__WrappedHandlerAsync|0>d.MoveNext()
    --- End of stack trace from previous location ---
       at Microsoft.Agents.AI.Workflows.Execution.MessageRouter.RouteMessageAsync(Object message, IWorkflowContext context, Boolean requireRoute, CancellationToken cancellationToken)
    
  3. added and removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Feb 23, 2026
  4. rogeriorfp commented on Feb 24, 2026

    @rogeriorfp

    Description

    In the repo, you have https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/Workflows/HumanInTheLoop/HumanInTheLoopBasic

    Which is a Human in the Loop sample... This seems not to work anymore with RC1 (If you guess a number, the sample just ends with no feedback or giving user the option to retry)

    I also have a similar Sample here: https://github.com/rwjdk/MicrosoftAgentFrameworkSamples/blob/main/src/Workflow.HumanInTheLoop/Program.cs , and there I just get a very un-descriptive error of

    System.InvalidOperationException: 'Executor 'Evaluator and Hint-giver' cannot send messages of type 'FeedbackToUser'.'
    
    Image when run... This sample worked flawlessly pre RC1

    Any hints as to what is going on here?

    Code Sample

    Error Messages / Stack Traces

    Package Versions

    RC1

    .NET Version

    .NET10

    Additional Context

    No response

    For the first example, you can fix it by adding the attributes [YieldsOutput(typeof(string))] and [SendsMessage(typeof(NumberSignal))] to the JudgeExecutor class. For the second example, I haven’t tested it, but since it’s the same error, I believe adding the attributes [YieldsOutput(typeof(string))] and [SendsMessage(typeof(FeedbackToUser))] to the EvaluateAndHintExecutor class should resolve it.

    [YieldsOutput(typeof(string))]
    [SendsMessage(typeof(NumberSignal))]
    internal sealed class JudgeExecutor() : Executor<int>("Judge")
    {
    ...
    }
  5. rwjdk commented on Feb 24, 2026

    @rwjdk
    Author

    Thanks... That works 🙌.

    Is what we just did a workaround or a mandatory part of workflow now (I did not see anything like this mentioned in any documentation)

  6. rogeriorfp commented on Feb 24, 2026

    @rogeriorfp

    I’m not sure. I tried it after noticing the presence of another attribute, [MessageHandler], in a different example and I also didn’t see anything in the documentation.

  7. rogeriorfp commented on Feb 24, 2026

    @rogeriorfp

    I believe this will become mandatory based on pull request #3792.

  8. mfoosSit commented on Mar 6, 2026

    @mfoosSit

    I got the same issue.
    Image

    Unfortunatelly the workaround with
    [YieldsOutput(typeof(string))] [SendsMessage(typeof(NumberSignal))] internal sealed class JudgeExecutor() : Executor<int>("Judge") ddnt solved it.

  9. rogeriorfp commented on Mar 6, 2026

    @rogeriorfp

    mfoosSit If you use context.SendMessageAsync, you should annotate the class with the SendsMessage attribute, and the type passed to typeof must be the type expected by the next executor.

    You didn’t provide any code snippet, but based on the error message it will probably be:

    [SendsMessage(typeof(ChatMessage))]

  10. moved this from Planned to In Progress in Agent Frameworkon Mar 18, 2026
  11. moved this from In Progress to In Review in Agent Frameworkon Mar 19, 2026
  12. moved this from In Review to Done in Agent Frameworkon Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetbugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions