The article on how sync works covers what you see. This one goes a level deeper, into what each device and the server actually do with your changes.
Every change becomes an operation
When you edit a note, your device does two things in one step: it saves the new text in its local database, and it adds an operation to a queue, a small record that says "this note changed, here is the new version". Creating, editing, pinning, tagging, archiving, and deleting a note are all operations.
Before sending the queue, your device tidies it up. Ten quick edits to the same note become one. If you pin a note while still typing in it, the pin and the new text are merged into a single operation, so neither change is lost. Queue order is the only order that counts: a later change always wins over an earlier one, whatever the clock on the device says.
An operation leaves the queue only once the server confirms it. If the connection drops halfway, or you close the app mid-sync, the queue is still there next time and nothing is lost.
Push, then pull
Sync is two simple conversations with the server:
- Push. Your device sends its queued operations in batches. The server applies each one and writes it to a change log for your account, giving each entry the next number in sequence.
- Pull. Your device asks: "what has changed since number 1,234?" The server answers with every log entry after that number, and the device applies them to its local database.
Because every device remembers the last number it saw, it only downloads what is new. It does not matter how long a device was offline: it catches up from exactly where it left off.
Everything that changes your notes goes through that log, including changes made through the API or an AI tool connected over MCP. That is why a note an AI assistant writes for you shows up on all your devices like any other.
How conflicts are caught
Each edit your device sends carries a note of the last version of that note it saw. If the server's copy has changed since then, because another device edited it in the meantime, the server does not overwrite anything. It answers with its own copy instead.
Your device then tries a three-way merge, the technique version-control tools use. It compares three texts: the version both devices started from, yours, and the server's. If the edits touch different parts of the note, it combines them and sends the merged result, and you never notice. Only when both devices changed the same lines does Caliu ask you which version to keep. See the article on conflicts.
Some changes can never conflict. Pinning, archiving, and making a note read-only do not count as edits to its text, so they merge cleanly with anything.
The same rules on every device
The web, Apple, and Android apps are written in three different languages, but they follow the same sync rules. The rules for tidying the queue are checked against one shared set of test cases on all three, so a change made on one device is handled the same way by every other.
Without an account
Without an account, nothing ever leaves your device. When you sign in, the notes already on your device join your account and are sent up like any other change.