anomalyco / anomalyco/opencode

[FEATURE]:feat: support selective acceptance of code changes (per-file/per-hunk) instead of all-or-nothing

Open
#39,673 1 comment 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Jul 30, 2026.

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

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem

Currently opencode applies all code changes unconditionally. If a specific line or file edit is incorrect, the user has no way to reject only that change — it is all or nothing.

Expected Behavior

Provide a mechanism for selective acceptance:

  1. Per-file accept/reject: Show a list of modified files, let the user choose which to keep
  2. Per-hunk/per-line accept/reject: Interactive mode similar to git add -p, allowing the user to review and accept/reject each hunk
  3. Diff preview + confirmation: Show the diff before writing, ask for confirmation
Use Cases
  • Most edits in a file are correct but one line has wrong logic
  • A particular file change violates project conventions
  • User wants to adopt only some suggestions while keeping the rest original

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.