Skip to content

Session becomes unusable after UnknownError: Failed to parse #2135

@maddeye

Description

@maddeye

At irregular intervals, I encounter the error shown below. When this happens:

  • opencode still runs, but the affected session becomes unusable.
  • Any further prompts sent to this session just repeat the same error.
  • Attempting to reopen the session after starting a new one also fails.

Error Log

failed to send message: POST
"http://127.0.0.1:55413/session/ses_73XXXX2aXffeDTHiXXTUpWNVvX/message": 400 Bad Request
{"name":"UnknownError","data":{"message":"SyntaxError: Failed to parse JSON"}}

Environment

  • Using: GitHub Copilot with Claude Sonnet 4
  • opencode version: v0.5.7
  • OS: Windows with git Bash

Steps to Reproduce

The issue appears sporadically and I haven’t found a deterministic reproduction path, but:

  1. Start a session.
  2. Interact with opencode for some time.
  3. At some point, the session fails with the above error.

Expected Behavior

The session should continue working without requiring a restart.

Actual Behavior

The session becomes permanently stuck, repeating the error until a new session is created. Old sessions cannot be reopened.

Additional Context

The error only occurs intermittently, but once triggered, it breaks the session workflow entirely.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions