Skip to content

opencode provider produced unparsable JSON on large features with no raw output or retry #71

@slick-daddy

Description

@slick-daddy

Description

When reviewing a feature that contains a large config file (Makefile), the opencode provider fails with unparsable JSON after a 257s timeout. The error message gives no information about what the raw output was or why parsing failed, making it impossible to debug whether the issue is on clawpatch's side or opencode's side.

Steps to Reproduce

  1. clawpatch init on a large Go project (stashapp/stash)
  2. clawpatch review --limit 3
  3. One of the features maps to a large Makefile (feat_config_0902ad7be8)

Output

clawpatch review feature-error index=3 total=3 feature=feat_config_0902ad7be8 elapsed=257s error=opencode provider produced unparsable JSON
clawpatch review failed run=20260518T055117-328316 errors=1
error: opencode provider produced unparsable JSON

Expected Behavior

  • The raw response from opencode should be logged (to .clawpatch/runs/ at minimum) so the user can diagnose the failure
  • Ideally: automatic retry with reduced context on parse failure
  • Or: a clear indication of whether the output was empty, truncated, or malformed JSON

Environment

  • clawpatch version: <clawpatch --version 0.2.0>
  • opencode version: <opencode --version 1.15.4>
  • provider: opencode
  • model: null
  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions