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
Description
session.writeStatefails withFailed to write session stateerror on OpenCode 1.17.7 (Windows). This error appears in the chat input area periodically during a session.Symptoms
[OpenToken] ERROR [uuid] (session.writeState) Failed to write session stateImpact
Temporary Workaround
Patching
dist/plugin.jsto remove thelogger.errorcall in thesession.writeStatefunction eliminates the error without affecting compression.Environment