Conflict Resolution
Automatic detection and resolution of contradictory memories.
Cortex automatically detects when new memories conflict with existing ones. Conflicts are resolved by authority or recency, with dissent retained.
How Conflicts Are Detected
When a new memory is written, Cortex:
- Generates an embedding for the content
- Searches for near-neighbours with similarity > 0.75
- Classifies each neighbour as a potential conflict
graph LR
A[New Memory] -->|embed| B[Vector Search]
B -->|similarity > 0.75| C[Conflict Candidates]
C -->|classify| D[Conflict Types]
Conflict Types
| Type | Description |
|---|---|
contradiction | Conflicting information (e.g., "rate limit is 100" vs "rate limit is 200") |
duplicate | Same information from different sources |
stale | Outdated information replaced by newer data |
Resolution Strategy
Conflicts are resolved using authority-based rules:
Authority Hierarchy
Authority is the memory's author's clearance level (not their role):
| Level | Authority |
|---|---|
Senior | Highest |
Junior | Middle |
Contractor | Lowest |
Resolution Rules
contradiction— higher-level author wins,resolution: "authority". A Senior's memory supersedes a Contractor's even if the Contractor's is newer — a lower-authority author cannot override a fact by simply writing something more recent.stale— the newer memory always wins,resolution: "recency", regardless of either author's level (it's an update, not a rank contest).- Same level,
contradiction— newer memory wins (tie broken by recency). - Dissent retained — the loser is marked
superseded, never deleted, and linked viasupersedesso recall can flag "history available".
Conflict Data Structure
{
"id": "uuid",
"memory_a": "uuid",
"memory_b": "uuid",
"kind": "contradiction",
"resolution": "authority",
"winner": "uuid",
"dissent_retained": true,
"resolved_by": "uuid",
"created_at": "2025-01-15T10:30:00Z"
}
Memory Lifecycle with Conflicts
stateDiagram-v2
[*] --> Active: remember()
Active --> Superseded: Conflict resolved (lost)
Active --> Active: Conflict resolved (won)
Superseded --> [*]: Retained but not recalled
| Status | Description |
|---|---|
active | Currently searchable |
superseded | Replaced by a more authoritative memory |
Example
{
"memory_id": "new-uuid",
"conflict_candidates": [
{
"memory_id": "old-uuid",
"score": 0.82
}
],
"conflicts": [
{
"id": "conflict-uuid",
"kind": "contradiction",
"resolution": "authority",
"winner": "new-uuid"
}
]
}
Conflicts are a feature, not a bug. They ensure Cortex stays consistent as new information arrives, while preserving the full history of decisions.