Source: deferred from v3 commit 6; current file-overlap detector is one primitive, real agentic conflicts span more
Problem
v3's file-overlap detector is `same path AND (same branch OR same worktree)`. Real agentic CC conflicts that aren't covered:
| Conflict |
Primitive needed |
| Both running dev server on same port |
`ports` table tracking who has port N bound |
| Both running tests vs shared DB |
`db_handles` table tracking which session has which DB connection |
| Both rebasing/pushing same remote branch |
`git_locks` table; integration with `git rev-parse` checks |
| `.git/index.lock` ownership |
Filesystem lock-file watcher |
| Long-running shell processes |
`processes` table fed by hooks on Bash tool calls |
Each one is its own primitive with its own discovery and reconciliation logic.
Priority order (based on observed value)
- ports — most common in dev workflows
- git_locks — high-impact (data loss risk)
- processes — broadest applicability
- db_handles — narrower
- .git/index.lock — rare but disruptive
Implementation sketch
- New table per primitive in sessions.db
- Detector hook fires on PostToolUse (for Bash/git ops) or via passive watcher (lsof for ports)
- Digest renderer adds a "conflicts" section grouping all primitives
- Auto-release on heartbeat-stale + detector-clear
Acceptance criteria
Source: deferred from v3 commit 6; current file-overlap detector is one primitive, real agentic conflicts span more
Problem
v3's file-overlap detector is `same path AND (same branch OR same worktree)`. Real agentic CC conflicts that aren't covered:
Each one is its own primitive with its own discovery and reconciliation logic.
Priority order (based on observed value)
Implementation sketch
Acceptance criteria