Repository navigation
feat(git): one-click "Let the agent resolve" for merge conflicts (#163) - #656
Merged
currentbits merged 2 commits intoAug 22, 2026
Merged
Conversation
… We still have 5 items on in progress bt i think we finished
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
currentbits
deleted the
coder/fork-one-click-let-the-agent-resolve-the-0c8138
branch
October 3, 2026 16:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #163.
The Git tab conflict card gets a primary Let the agent resolve button next to Retry merge. It reads the conflicted files out of the worktree, builds a resolve prompt, starts a turn on the same thread, and re-fires the merge once that turn finishes. Dismissing the card cancels the pending retry.
What changed
electron/worktrees.js— newconflictContext(): unmerged paths plus on-disk snippets, capped at 12 files / 16 KB per file / 48 KB total; binary files reported by name only.src/conflictResolve.ts— new. Prompt builder, plusparseConflictFilesas a fallback that recovers the file list from theMERGE_CONFLICT:body when the context call fails.src/components/AgentsPanel.tsx— the button, the busy/Resolving…states, and the working→done watcher that fires the merge retry.electron/ipc.js,electron/preload.js,src/shared/ipcChannels.ts,src/shared/ipc.ts,src/useCoder.ts,src/App.tsx,src/devCoder.ts— the full IPC declaration forgit:conflictContext. Preload is included, so the method is not undefined in a packaged build (the One IPC channel is declared in six places: generate the two thin clients from a channel table #623 trap).Verification
npx tsc --noEmit— exit 0.test/conflictResolve.test.ts+test/worktreeConflict.test.tsx— 9 tests, 9 pass.electron/test/worktrees.test.jsgains coverage forconflictContextbut was not run here; it needs the fullscripts/test-electron.jsharness.Worth a look during review
The merge retry is implicit: it fires when the resolve turn ends, whether or not the agent actually cleared the markers. A failed retry just re-shows the conflict card, so it is recoverable, but there is no "review then click" step in between.
Opened with
allowOversize— 723 lines, but 363 of those are the two new test files.🤖 Generated with Claude Code