anomalyco / anomalyco/opencode
apply_patch failure rate differs sharply by model (aggregate local data)
@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
- Use OpenCode with a session whose
model.idis either model above. - Perform file edits that invoke
apply_patch. - Inspect stored
partrecords forstate.status = "error". - Compare error-part count with
apply_patchattempt 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.