Skip to content

run: one field changing type collapses an entire result to an unclassified stop #47

Description

@JumpTechCode

json.Unmarshal into result fails on any type mismatch anywhere in the object. If a future release emits "input_tokens": 1234.0, or turns session_id into an object, a run that completed normally is reported as StopFailed/StopUnknown.

That fails safe — ERROR, never FAIL — and it fails much harder than it needs to: every field is lost because one moved. Decoding fields independently once type == "result" is confirmed would degrade instead of collapsing, keeping the cost and the session identifier from a result whose token counts changed shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions