
Your agent's new C# union deserialises half a payload as a valid case: pin it with a JSON corpus
System.Text.Json in .NET 11 reads unions natively, but two object-shaped cases throw until you add a classifier, and the classifier accepts a payload with a field missing. Eight xUnit tests close both gaps, and they work with any agent.
9 min read
