Skip to content

session.writeState error on OpenCode 1.17.7 (Windows) #7

Description

@CuiWeiloong

Description

session.writeState fails with Failed to write session state error on OpenCode 1.17.7 (Windows). This error appears in the chat input area periodically during a session.

Symptoms

  • UI shows red error toast: [OpenToken] ERROR [uuid] (session.writeState) Failed to write session state
  • Compression still works (tool output is compressed correctly), but error is disruptive to UX
  • Occurs with OpenCode 1.17.7, OpenToken 2.2.0, Windows 11

Impact

  • Visual noise in the chat UI
  • No functional impact on token compression itself

Temporary Workaround

Patching dist/plugin.js to remove the logger.error call in the session.writeState function eliminates the error without affecting compression.

Environment

  • OS: Windows 11
  • OpenCode: 1.17.7
  • OpenToken: 2.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions