opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Unexpected null values in session summary

Open bunchjesse opened this issue 1 week ago • 3 comments

Description

I have this session:

{
  "info": {
    "id": "ses_476480924ffeZu4lqDMRXlA36b",
    "version": "1.0.223",
    "projectID": "8b59d096c13d03205dd938db45501cd1bc1270a8",
    "directory": "<redacted",
    "title": "Distinguishing debug build from Xcode install",
    "time": {
      "created": 1767542093531,
      "updated": 1767544026394
    },
    "summary": {
      "additions": null,
      "deletions": null,
      "files": 13
    }
  },
  "messages": [ ... ]
}

Notice the summary->additions and summary->deletions are both null. This causes the data returned from the OpenAPI-generated SDK to fail deserialization because the spec does not mark these as nullable.

"Session": {
  "type": "object",
  "properties": {
    ...
    "summary": {
      "type": "object",
      "properties": {
        "additions": {
          "type": "number"
        },
        "deletions": {
          "type": "number"
        }

Are these expected to be null? If not, perhaps there is a bug causing this. If so, could we update the OpenAPI spec to make these nullable?

Plugins

No response

OpenCode version

1.1.1

Steps to reproduce

Unknown how I got into this state

Screenshot and/or share link

No response

Operating System

macOS 26

Terminal

Terminal

bunchjesse avatar Jan 04 '26 23:01 bunchjesse