ox sync
Manually synchronize your Ledger and Team Context repositories with the server. The ox daemon handles this automatically in most cases — you rarely need this command.
Usage
Flags
| Flag | Description |
|---|---|
--team <id> | Sync a specific Team Context by ID |
--all-teams | Sync all configured Team Contexts |
--remove-team <id> | Remove a Team Context from local sync |
What gets synced
The sync command pulls the latest changes from two git repositories:
| Repository | Contains | Location |
|---|---|---|
| Ledger | Commit history, code observations, project decisions | .sageox/ledger/ |
| Team Context | Conventions, distilled discussions, team knowledge | .sageox/teams/<team>/ |
Both repositories use git pull --rebase to incorporate server changes while preserving any local commits (like uncommitted observations).
When you need manual sync
The daemon syncs automatically every 5 minutes. Manual sync is useful when:
- Network was down — Force a sync after reconnecting
- Need latest context immediately — Before starting a session that needs recent team decisions
- Debugging sync issues — Verify that sync works before running
ox doctor - After changing team membership — Pull new Team Context access
Examples
Automatic sync (daemon)
The ox daemon (oxd) runs in the background and syncs automatically. The sync interval is controlled by your team's manifest (default: 5 minutes).
Check daemon status:
If the daemon isn't running, start it:
Most users never need ox sync — the daemon handles everything. If you find yourself running it often, check that your daemon is running with ox daemon status.
Troubleshooting
"Not authenticated" — Run ox login first.
"Repository not initialized" — Run ox init in your project directory.
"Sync failed: network error" — Check your internet connection and try again.
"Merge conflict" — This shouldn't happen (files use UUIDv7 names to avoid conflicts). If it does, the command will log an error and flag it for manual resolution.
What's next
- Team Context — Understand what's in your Team Context
- ox doctor — Diagnose sync and configuration issues
- ox init — Initialize a repository with SageOx

