Operator Runbook
Day-2 operations for running Syncropel in production: instance lifecycle, recovery from corruption, backup discipline, in-place upgrades, and how to recognize the failure modes you're about to hit.
Audience
This page is for the person on the other end of a spl serve that's actually serving real work. It's not for first-time installation (see Quickstart) or feature exploration (see Guides). It assumes you have an instance running and you need to keep it healthy, recover when it isn't, and upgrade it without losing data.
If you're reading this because something just broke, jump to Recovery.
Instance lifecycle
Starting the instance
spl serve --daemonThis starts the instance in the background, writes a PID file to ~/.syncro/run/spl.pid, opens the SQLite store at ~/.syncro/hub.db, takes a startup backup (see Backup discipline), binds 127.0.0.1:9100, and binds a Unix socket at ~/.syncro/run/spl.sock.
Verify it came up:
spl status
curl -fsS http://localhost:9100/healthBoth should report ok with the current version and record count.
Stopping the instance
spl stopThis reads ~/.syncro/run/spl.pid, sends SIGTERM to the instance process, and waits for graceful shutdown. The instance finishes pending writes, closes the socket, removes the PID file, and exits.
When spl stop says "not running" but the instance clearly is
This happens after long-running instances lose their PID file (host reboot, WSL restart, or the file was clobbered by a runaway test). The instance is still bound to port 9100 but spl stop can't find it.
Recovery:
# Find the actual process
pgrep -af "spl serve"
# Send SIGTERM directly. Use SIGKILL only as last resort.
kill <pid>
# Verify the port is free
ss -tlnp 2>/dev/null | grep 9100Then start it again.
Reading instance logs
Logs live at ~/.syncro/logs/spl.log (JSON-line format). Tail them:
tail -f ~/.syncro/logs/spl.logThe structured fields you'll care about most:
| Field | Meaning |
|---|---|
level | ERROR, WARN, INFO, DEBUG, TRACE |
target | The part of the system that wrote the line |
actor | The DID involved in the operation |
thread | The thread ID being touched |
record | The record ID, when a record was received |
To filter for permission denials specifically:
grep "PERMISSION DENIED" ~/.syncro/logs/spl.logBackup discipline
CRITICAL: read this section twice. Syncropel's backup mechanism is a safety net, not a backup system. It will fail to save you if you don't supplement it with off-host copies. Copy your backups to another machine or disk.
What the instance does for you
On every startup, spl serve checks if ~/.syncro/hub.db exists. If it does, the instance copies it to ~/.local/share/syncropel/backups/<instance-key>/hub.db.bak. The backup directory is outside ~/.syncro/ so rm -rf ~/.syncro/ doesn't kill it.
The instance key is one of:
instance-<did-tail>once your instance has an identity (the normal case).<did-tail>is the last 24 hex characters of the instance DID.home-<short-hash>ifSYNCROPEL_HOMEis set but no DID exists yet.- The legacy flat path
~/.local/share/syncropel/backups/hub.db.bak, only for a default home with no instance DID at all, which is rare.
To find your instance's directory:
curl -s localhost:9100/health | jq -r .instance_did
ls ~/.local/share/syncropel/backups/instance-<tail>/The daily backup job writes timestamped hub.db.<YYYYMMDD-HHMMSS> copies into the same per-instance directory, alongside the startup hub.db.bak.
What the instance does NOT do, and the trap to avoid
The startup backup is destructive. Every spl serve invocation overwrites the backup file with a snapshot of the current hub.db, even if the current hub.db is empty, corrupt, or wrong.
Concretely: if you delete hub.db and restart the instance, the instance comes up with an empty database, then on the next restart writes that empty database OVER your good backup. By the time you realize what happened, the backup is gone.
Copy the backup file off the machine as soon as it is created, so a wiped disk does not take the backup with it.
What you should do instead
Schedule a periodic off-host backup of BOTH ~/.local/share/syncropel/backups/<instance-key>/hub.db.bak (records, trust, config) AND ~/.syncro-data/ (task content files and alias map). The instance auto-backs up only the former; the latter is referenced by path during dispatch but not auto-snapshotted.
# Daily snapshot to a directory you trust
DEST=$HOME/backups/syncropel
DATE=$(date +%Y%m%d-%H%M%S)
mkdir -p "$DEST"
# Records + trust + engine config
cp ~/.local/share/syncropel/backups/*/hub.db.bak \
"$DEST/hub.db.$DATE.bak"
# Task content files + alias map (rich-text bodies referenced by spl task dispatch)
tar -czf "$DEST/syncro-data.$DATE.tar.gz" -C "$HOME" .syncro-data
# Keep last 14 days of each
find "$DEST" -name 'hub.db.*.bak' -mtime +14 -delete
find "$DEST" -name 'syncro-data.*.tar.gz' -mtime +14 -deleteOr, if you're running in Docker, mount a host directory into the backup path so the rolling backup lives outside the container's ephemeral filesystem:
docker run -d \
-p 9100:9100 \
-v spl-home:/syncropel \
-v $HOME/backups/syncropel:/home/syncropel/.local/share/syncropel/backups \
syncropic/spl:devFor added safety, a daily cron or systemd timer snapshotting that host directory to remote storage (S3, B2, SFTP, etc.) is appropriate for any instance carrying real data.
Portable backup: publish the instance
The sqlite .bak protects against local file loss. For a backup that travels (one you can rebuild a working instance from on any machine), publish the whole instance as a repository snapshot:
spl repo publish <namespace>/<repo> --relocation--relocation is shorthand for --visibility L3 --scope instance --no-listing --carry-tokens: it snapshots the instance as a verified, portable repository tree. Restore with spl repo restore <dir-or-https-url> (client-side, daemon stopped) or hydrate a fresh home at boot with spl serve --repo <locator>. The published repository is the portable way to recover; the .bak stays the fast local safety net.
What does NOT need to be backed up separately
- Trust scores: rebuilt from your records when the instance starts.
- Configuration: stored as records, so it comes back with them.
- Routing rules, health checks, decision policies, permission rules: also stored as records, so they come back too.
Your records are the source of truth. As long as hub.db is intact, everything else recovers automatically.
What needs separate attention
~/.syncro/secrets/: API keys for any LLM provider you've configured (Anthropic, OpenAI, Google, etc.). Not in the record log. If you lose this, you lose your provider keys. Back them up to a password manager or secure vault.~/.syncro-data/: task content files (the rich-Markdown bodies for each task, addressed by their alias, e.g.,MY-001.md) and the alias-to-thread mapping. The metadata (titles, statuses, hashes) lives in records onhub.db; the canonical content files live here on disk and are referenced by path duringspl task dispatch. Backing uphub.dbwithout~/.syncro-data/leaves task content stranded. Both belong in your snapshot.
Recovery from corruption or data loss
Symptom: instance won't start, panics on first ingest
Likely cause: SQLite store is corrupt. Read the panic message in ~/.syncro/logs/spl.log for the exact error.
Recovery procedure:
# 1. Stop the instance (or kill any lingering process)
spl stop || pkill -f "spl serve"
# 2. Move the corrupt store aside (don't delete: you may want it for forensics)
mv ~/.syncro/hub.db ~/.syncro/hub.db.corrupt.$(date +%s)
mv ~/.syncro/hub.db-wal ~/.syncro/hub.db-wal.corrupt.$(date +%s) 2>/dev/null || true
mv ~/.syncro/hub.db-shm ~/.syncro/hub.db-shm.corrupt.$(date +%s) 2>/dev/null || true
# 3. Restore from your OFF-HOST backup (NOT the instance's auto-backup,
# which may have been overwritten, see "Backup discipline" above)
cp $HOME/backups/syncropel/hub.db.20260412-123000.bak ~/.syncro/hub.db
# 4. Restart and verify
spl serve
spl statusIf you don't have an off-host backup, the instance's auto-backup MAY still be intact:
ls -la ~/.local/share/syncropel/backups/*/
# pick the most recent hub.db.bak with a non-trivial size
cp ~/.local/share/syncropel/backups/<instance-key>/hub.db.bak ~/.syncro/hub.dbBut only do this if the instance hasn't already started and overwritten the backup. If the corrupt instance already ran, the auto-backup is now a snapshot of the corrupt state.
Symptom: the record store was deleted by accident
Same procedure as above, minus step 2. Restore from off-host backup, restart.
Symptom: trust scores wrong, routing rules missing
These are rebuilt from your records. To force a rebuild, restart the instance:
spl stop
spl serve # rebuilds trust and rules on startup
spl trust # verify rebuild
spl config list-rulesIf they're still wrong after a restart, the underlying records are wrong (or missing). Check the record log directly:
spl thread records th_engine_config | head -50 # config history
spl thread records <thread-id-of-concern> # specific threadSymptom: permission enforcement locked you out
You enabled spl config permissions-enable without an admin allow rule, and now spl config permissions-disable returns 403. The command normally checks for this first, but if you disabled an admin rule by mistake it can still happen:
spl stop # the running instance would override this change
spl config permissions-unlock # writes permissions_enabled=false direct to store
spl serve # restart: enforcement is offSee CEL Expressions → Permission Enforcement for the full lockout trap explanation.
In-place upgrades
The supported upgrade path
# 1. Snapshot first. Always.
cp ~/.syncro/hub.db $HOME/backups/syncropel/hub.db.pre-upgrade.$(date +%s).bak
# 2. Stop the instance
spl stop
# 3. Install the new binary (atomic mv via the install script)
curl -sSf https://get.syncropic.com/spl | sh
# 4. Verify the new binary version
spl version
# 5. Restart
spl serve
# 6. Verify health + record count match pre-upgrade
spl statusIf the instance runs under systemd, the same sequence is systemctl --user stop spl-serve, install, systemctl --user start spl-serve. Stop first in every case: a live copy over the running binary is refused (Text file busy), and a work loop's worker is started from the daemon's own binary, so an already-running worker keeps the version it started with until the daemon restarts.
The workspace process is hardened: a same-user shell cannot inspect it, and it writes no core dump. This is intended, not a fault. To confirm which binary a running workspace is using, run sudo -n readlink /proc/<pid>/exe.
Runs started by anyone other than the operator go through the sandboxed transport. To stop a run at its next step, POST /v1/runs/{thread}/events with {"type":"stop"}; the run ends as cancelled. To turn the sandboxed transport off, write one config record per tier (work_loop_transport for the operator, work_loop_transport_members for everyone else); see The sandboxed transport.
Upgrades keep your existing data. If a release needs a data migration that you must run yourself, the release notes say so and the instance refuses to start until you run it.
What can go wrong, and how to recognize it
- Binary download fails partway: the install script downloads to a temp file and atomically
mvs into place. A failed download leaves the old binary intact. You'll see the old version onspl version. - Instance won't start on the new binary: a panic or graceful refusal. Read the log. Roll back by reinstalling the previous version (
curl -sSf https://get.syncropic.com/spl?v=<previous-version> | sh) and restarting. - Records present but trust scores empty: trust is rebuilt from your records when the instance starts. Wait a moment, then run
spl trustagain.
Common issues and fixes
"Address already in use" on spl serve
Another instance is already bound to port 9100. Either you have a stale spl serve running (use pgrep -af "spl serve" then kill), or another process took the port. Find it with ss -tlnp | grep 9100.
~/.syncro/run/spl.pid exists but no process
The PID file is left over from a process that no longer runs. Delete it and start again:
rm -f ~/.syncro/run/spl.pid
spl servespl task done returns "uncommitted changes"
The task completion gate refuses to mark a task complete when the working tree has uncommitted changes: it's protecting against attributing wrong commits to the task. Either commit your work first, or use --force if you're sure (e.g. for triage of pre-existing tasks).
Health check returning non-200 even though the instance is up
The HEALTHCHECK in the docker image hits /health. If you're behind a reverse proxy, make sure the proxy isn't injecting auth that breaks the request. The /health endpoint is exempt from permission enforcement specifically so liveness probes work.
High memory growth over multi-day uptime
The instance keeps active threads in memory. If memory keeps growing without limit, run spl status -o json and include the output in your report.
Running work under memory pressure
When you start a worker (spl task dispatch <task>, spl run <goal>, or anything else that launches a separate process), the instance writes one of three log lines:
DEBUG dispatch pre-flight: host memory healthy avail_gb=8.1
INFO dispatch pre-flight: host approaching memory pressure avail_gb=3.2
WARN dispatch pre-flight: host under memory pressure — OOM-kill risk; consider sequential dispatch avail_gb=1.4Find them in ~/.syncro/logs/spl.log (search for dispatch pre-flight), or in journalctl under systemd. On Linux the check runs automatically. On macOS and Windows, watch the system's process monitor instead.
When you see a memory-pressure line:
- Do not start more parallel workers.
- Free memory: close idle browser tabs and idle agent sessions.
- Run one worker at a time by setting
max_concurrent = 1on the adapter.
If a worker was already killed, follow the next section.
A worker was killed: recover its work
If spl task show <task-id> reports Status: failed with Prior attempts: 1 failed ($0.00 total) shortly after you started several workers at once, the system most likely ran out of memory and stopped the worker (signal 9). Whatever the worker had already saved to disk is still in its working folder, even though the task shows commits ahead: 0. You can usually keep that work instead of starting over.
-
Confirm the cause.
spl task diagnose <task-id> | tail -30Look at the
SubprocessandCompletionblocks. An out-of-memory kill looks like this:Subprocess pid: <pid> runtime: <ms> ← typically under 10 minutes exit_code: None signal: Some(9) ← the process was killed Completion codepath: stream_eof_fallback failure_reason: result_missing success: falseIf the signal is 15 instead of 9, the worker was asked to shut down rather than killed for memory. The steps below still work, but the advice on avoiding memory kills at the end of this section will not help. Check for a spent budget, the agent tool's own signal handling, or container memory limits.
-
Look in the working folder. The diagnose output gives
worktree:andlatest commit:. Go to that folder:cd /path/to/<your-project>-<task-id> git status -sChanged or new files are work the worker finished before it was stopped. Do not delete the folder.
-
Decide whether the work is complete.
git diffIf it looks finished, go to step 4. If it is partial, read the task brief (
spl task show <task-id>), finish the missing items in the folder, then go to step 4. -
Commit the work. The folder is already on the task's branch:
git add <specific-files> git commit -m "feat(scope): <change> (<task-id>) Recovered by hand after the worker was killed for memory." -
Merge it into your main branch.
cd /path/to/<your-project> # your main folder git merge task/<task-id> --ff-only # or `git cherry-pick <hash>` if main has moved # Run your project's tests here git push origin main -
Reopen the task and finish it. The task is still marked failed:
spl task reopen <task-id> --reason "recovered by hand after the worker was killed" SPL_ACTOR=did:sync:agent:dev spl task done <task-id> --summary "..." --domain code SPL_ACTOR=did:sync:agent:reviewer spl task approve <task-id> --domain code --notes "..."Put the commit hash and test result in the reviewer's
--notesso the record of who did what stays accurate. -
Remove the working folder.
cd /path/to/<your-project> git worktree remove <your-project>-<task-id> --forceThe branch stays after the merge. That is fine.
Avoiding memory kills
- Limit parallel workers to what your memory allows. On a machine already running a few agent sessions and
spl serve, evenmax_concurrent = 2may be too many. If memory is tight, usemax_concurrent = 1. - Close idle agent sessions first. Each background agent session often uses 200-500 MB.
- Set generous timeouts. A timeout does not prevent a memory kill, but a longer one gives the worker more time to save its work before anything else goes wrong.
Multi-instance fleet operations
This section covers multi-instance deployments. If you're running a single instance, skip it.
A "fleet" is two or more spl instances that coordinate via the instance registry. One instance is the coordinator (keeps the list of instances, receives their heartbeats, and collects fan-out results). The others are workers (execute dispatched work, report heartbeats, POST completion records back to the coordinator). Any instance can play either role; the distinction is config, not code.
This section covers the operations you run day-2 on a fleet. For a first walkthrough, see Your first fan-out.
Booting a fleet
spl fleet start --workers 2Starting local fleet: 1 coordinator + 2 workers
[coordinator] spawned PID 414153 on :9100 (home=~/.syncro)
[worker-a] spawned PID 414154 on :9201 (home=~/.syncro-worker-a)
[worker-b] spawned PID 414161 on :9202 (home=~/.syncro-worker-b)
Waiting for fleet convergence (3 live)...
✓ fleet converged
Fleet ready. Inspect with:
spl fleet list
spl fleet statusThis boots the coordinator on ~/.syncro port 9100 plus N workers on ~/.syncro-worker-{a,b,...} ports 9201, 9202, ... Each worker inherits the coordinator URL from the [fleet] config section and begins emitting heartbeats within ~15 seconds. Workers start with nothing else shared: to give them some of the coordinator's threads, pass --share <threads> (see the CLI reference). The command exits with an error if no worker took the share. The wrapper polls /v1/fleet/status until all expected instances are live or 30 seconds pass; if convergence times out, fall through to Worker not registering.
Verify the fleet is healthy:
spl fleet list DID ENDPOINT STATUS VERSION UPTIME HEALTH
did:sync:instance:923a4e6d10646e27 http://127.0.0.1:9201 live 0.X.Y 0s healthy
did:sync:instance:dfe40ff4272ad900 http://127.0.0.1:9202 live 0.X.Y 0s healthy
did:sync:instance:e6f09984f9ccd634 http://127.0.0.1:9100 live 0.X.Y 0s healthy
3 live · 0 stale · 0 archivedAll declared instances should appear with status live. If any show stale or are missing, see Worker not registering.
Observing the fleet
spl fleet status # snapshot of live/stale/archived counts
spl fleet show <did> # detailed view of one instance
spl fleet ping <did> # reachability + latency check via HTTP /healthspl fleet status aggregates everything an operator usually wants to see at a glance:
Fleet status
Coordinator URL: http://127.0.0.1:9100
Heartbeat: every 5s
Instances: 3 live · 0 stale · 0 archived
Active freezes: (none)
Emergency stop: inactivespl fleet show <did> drills into one instance's details: endpoint, version, uptime, current dispatch count, store size, and last heartbeat:
Instance: did:sync:instance:923a4e6d10646e27
Endpoint: http://127.0.0.1:9201
Status: live
Version: 0.X.Y
Uptime: 5s
Health: healthy
Active dispatches: 0
Store records: 7
Last heartbeat: 1776119018 (unix)spl fleet ping <did> measures reachability + latency via the worker's /health endpoint:
✓ did:sync:instance:923a4e6d10646e27 reachable in 0ms (200 OK)For deep inspection of a specific instance, SSH into its host and run spl doctor + spl status locally against that instance's port. The fleet-level commands aggregate over HTTP; the per-instance commands hit the local socket.
Coordinator replacement (manual failover)
Only the coordinator keeps the list of instances. If it dies, workers keep working locally but cannot register or coordinate fan-out until you choose a new coordinator. Failover is manual.
To replace a dead coordinator:
- Pick a surviving worker to promote. Any worker can play the coordinator role. They differ only in config.
- Stop the chosen worker cleanly:
spl fleet stop --instance worker-a(or send SIGTERM directly ifspl fleetis unreachable). - Edit its config at
~/.syncro-worker-a/config.toml: remove the[fleet] coordinator_urlline (so it no longer reports to an external coordinator), or leave it pointing at its own endpoint. - Restart:
SYNCROPEL_HOME=~/.syncro-worker-a spl serve --port 9201. The promoted instance now holds the registry. - Update remaining workers to point their
[fleet] coordinator_urlat the new coordinator's endpoint. Restart each. - Verify:
spl fleet listagainst the new coordinator should show all workers live.
Programmatic agents, agents that write code
Connect Syncropel to agents that do their work by writing and running code. Many operations take one round trip to the model. Works with any model that can run code, in any sandbox.
What spl doctor tells you
Every row spl doctor prints, quoted as it prints, with what a warning on it means and what to do. Run it first when something feels wrong, after an upgrade, and before filing a report.