Add a button to hand PR merge conflicts to the agent - #294
Merged
Conversation
The PR pane already knows when GitHub reports a conflicting merge, but resolving it meant switching to the chat and typing the request. This adds a one-click handoff that injects the ask into the worktree's agent chat, waking a slept tab the same way the CI-failure notifier does. Deliberately a button rather than the standing opt-in CI failures get: a branch that conflicts with its base usually conflicts with every other in-flight branch too, so firing this automatically would put the whole workspace to work over one bad merge base. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Plenty of repos keep linear history, so telling the agent to merge the base branch in was wrong for half of them. The agent is sitting in the repo and can read the convention off git log and CLAUDE.md, so name the goal and let it pick. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
hasConflict === trueon an open PR.deliverToWorktreeChatrouting — so it wakes a slept chat tab the same way the CI-failure notifier does. It lands in the transcript as a labelledNess · Merge conflictscard, not as something the user typed.Two things the message deliberately leaves out, both commented at
buildMergeConflictMessage:git merge-treepreview from Ness would name files the agent then finds clean — it has git and can see the real answer.git logand CLAUDE.md, and Ness has no setting that records it (mergeStrategyis how a PR lands on main, which says nothing about how a branch syncs with its base).Test plan
npm run typecheckcleannpx electron-vite buildcleannpx vitest run— newmerge-conflict-request.test.tscovers the sentinel round-trip (guards themerge-conflictautomation source being registered, without which the chat would render it as a plain user turn) and that the PR number / branch / base / URL make it into the body🤖 Generated with Claude Code