anomalyco / anomalyco/opencode

apply_patch failure rate differs sharply by model (aggregate local data)

Open
#41,494 1 comment 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 10, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

apply_patch error parts differ materially between two model IDs in same local OpenCode install. This may be model tool-call output quality, but current stored error data does not distinguish invalid patch input from file/context or runtime failures.

Local aggregate, 2026-07-11 through 2026-08-10:

Model ID Attempts Errors Rate
cx/gpt-5.6-terra 1,223 156 12.76%
cx/gpt-5.6-luna 1,092 397 36.36%

An error is stored tool part where type=tool, tool=apply_patch, and state.status=error. Retries count separately. Attribution uses session.model.id, so it is aggregate evidence, not per-invocation proof. No raw paths, code, prompts, diffs, or tool payloads included.

Related: #18108, #20227, #27282.

Plugins

@opencode-ai/plugin 1.15.11

OpenCode version

1.18.15

Steps to reproduce

  1. Use OpenCode with a session whose model.id is either model above.
  2. Perform file edits that invoke apply_patch.
  3. Inspect stored part records for state.status = "error".
  4. Compare error-part count with apply_patch attempt count per model.

I cannot provide a deterministic minimal reproduction yet. What normalized error field or telemetry should be used to separate malformed tool input from file/context and runtime failures?

Screenshot and/or share link

Not available. Sharing local sessions would expose repository data.

Operating System

macOS

Terminal

Not relevant; aggregate data read from local SQLite session store.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.