Skip to content

Session becomes unusable after UnknownError: Failed to parse #2135

Closed

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.

Activity

  1. github-actions commented on Aug 21, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Aug 21, 2025

    @rekram1-node
    Contributor

    Is there anything special with this session? is it super long or anything

  3. maddeye commented on Aug 26, 2025

    @maddeye
    Author

    It's not consistent.
    Sometimes it only takes one or two prompts, and sometimes it took 10+.

    Deleting the cache have some effect on it. But nothing consistent to report.

  4. rekram1-node commented on Sep 24, 2025

    @rekram1-node
    Contributor

    Are you still encountering this on latest @maddeye

  5. maddeye commented on Sep 24, 2025

    @maddeye
    Author

    Cannot test ot right now. I will chrck on monday.

  6. maddeye commented on Sep 29, 2025

    @maddeye
    Author

    The problem seems to be fixed. Thanks a lot!

  7. rekram1-node commented on Sep 29, 2025

    @rekram1-node
    Contributor

    awesome!

  8. vanboom commented on Dec 4, 2025

    @vanboom

    Curious if there is a way to fix this to resume the session? It is happening to us today multiple times leaving a corrupted session that can't continue.

  9. rekram1-node commented on Dec 4, 2025

    @rekram1-node
    Contributor

    @vanboom whats the error, provider, etc? Can you share the session

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

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