3_agent.txt
Duplicate of #> Original approach: Custom UnknownSessionEvent type + TryFromJson wrapper method in runtime code.
New approach: Set IgnoreUnrecognizedTypeDiscriminators = true on the [JsonPolymorphic] attribute and make SessionEvent non-abstract. Unknown event types now deserialize as the base SessionEvent with Type = "unknown" — no custom types or runtime code changes needed.
The fix is a 3-line change in the codegen script (scripts/codegen/csharp.ts) plus the regenerated output.
Originally posted by @Ron537 in #880