Jujutsu treats conflicts as first-class objects. This guide explains how conflicts work and how to resolve them.
What Are Conflicts?
In Jujutsu, a conflict is a state a change can be in — not an error to immediately fix.
bash
# Create a conflict intentionally
jj rebase -d conflicting-branch
# The change exists, just marked as conflicted
jj log
# (conflict) mnxpqkpv main
# My change descriptionWhy This Matters
| Git Approach | Jujutsu Approach |
|---|---|
| Conflict blocks operation | Conflict is a valid state |
| Must resolve immediately | Can resolve asynchronously |
| No record of conflict | Conflict stored in history |
| Binary: resolved/unresolved | Graduated: can annotate |
Types of Conflicts
Content Conflicts
Two changes modify the same file region:
file.txt
<<<<<<< Side A
function old() { return 1; }
=======
function new() { return 2; }
>>>>>>> Side BFile Conflicts
- One side modifies, other deletes
- Both sides add file with different content
- Rename conflicts
Complex Conflicts
Multiple files, multiple regions — all tracked together.
Working with Conflicts
Detecting Conflicts
bash
# List all conflicts
jj conflicts
# In log
jj log
# (conflict) indicates conflicted changes
# Show conflict details
jj show conflicted-change-idResolving Conflicts
Interactive Resolution
bash
# Start resolution
jj resolve
# For each conflict, choose:
# - Accept A (ours)
# - Accept B (theirs)
# - Merge (edit the result)Manual Resolution
Edit conflict markers directly:
bash
# Edit files
vim file-with-conflict.txt
# Remove conflict markers, keep desired content
# Mark as resolved
jj resolve --list # See remaining conflictsUsing Tools
Configure merge tool in ~/.jjconfig.toml:
toml
[ui]
merge-editor = "vscode"
# or "vimdiff", "meld", "idea", etc.Then:
bash
jj resolve --tool vscodeAbandoning Resolution
bash
# Undo the rebase that caused conflict
jj undo
# Or rebase elsewhere
jj rebase -d different-parentConflict Inbox (Kizuna UI)
Kizuna provides a dedicated UI for managing conflicts:
Viewing Conflicts
- Navigate to Conflicts in repository sidebar
- See list of all conflicted changes
- Click for detailed view
Conflict Details
For each conflict:
- Both changes shown side-by-side
- Diff highlighting conflict regions
- Agent annotations (if applicable)
- Suggested resolutions
Resolution Workflow
- Assign: Route to human or agent resolver
- Review: Examine both sides
- Resolve: Choose or create merged version
- Verify: CI runs on resolved change
Agent-Assisted Resolution
Confidence Annotations
Agents can annotate conflicts with reasoning:
Conflict in auth.js
├── Side A (our change): Add OAuth login
├── Side B (their change): Add SAML login
└── Agent analysis: These are complementary — combine bothDelegation
Escalate to specialist agents:
bash
# Via A2A message
{
"type": "conflict_arbitration",
"change_id": "abc123",
"specialty": "authentication",
"both_sides": [...]
}Best Practices
Prevention
- Pull frequently — Smaller sync windows
- Communicate — Coordinate with team
- Small changes — Easier to merge
- Feature flags — Avoid long-lived branches
Resolution
- Understand both sides — Don't just pick yours
- Test the result — Verify merged code works
- Commit resolution — Explain the merge
- Learn — Why did this conflict occur?
Team Workflow
- Conflict inbox review — Daily triage
- Assign specialists — Domain experts resolve
- Document patterns — Common resolutions
- Automate where possible — Detectable patterns
API Access
List Conflicts
bash
curl /api/v1/repos/org/repo/conflictsGet Conflict Details
bash
curl /api/v1/repos/org/repo/conflicts/abc123Resolve via API
bash
curl -X POST /api/v1/repos/org/repo/conflicts/abc123/resolve \
-d '{"resolution": "side_a", "reason": "Side A has better error handling"}'Summary
Jujutsu's first-class conflicts enable:
- Async resolution — No immediate pressure
- Structured tracking — Conflicts are data
- Agent involvement — Automated analysis
- Complete audit — Resolution history preserved
This transforms conflicts from interruptions into manageable workflow items.