Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Settings Sync

Keep your Autohand configuration, custom agents, skills, hook scripts, memory, and session history in sync across every machine you sign in on. Sync runs in the background while Autohand is running.

What syncs across devices

When sync is on, Autohand uploads these paths under ~/.autohand/ and downloads them on your other machines:

Category What gets synced Location
Configuration Your global config, including provider API keys, model choices, permission rules and hook definitions. The auth (sign-in) and mcp (MCP servers) keys are removed before upload and kept local. Uploaded encrypted. Only config.json syncs; a config.toml or config.yaml does not. ~/.autohand/config.json
Custom agents Agent definition files ~/.autohand/agents/
Skills User-level skills, both ones you wrote and community skills you installed ~/.autohand/skills/
Community skills data Community skills cache and pending submission queue ~/.autohand/community-skills/
Hook scripts Scripts your hooks call (the hook definitions themselves sync with config.json) ~/.autohand/hooks/
Memory User-level memory. The memory event log is merged rather than overwritten. ~/.autohand/memory/
Project knowledge Per-project knowledge Autohand stores in your home directory ~/.autohand/projects/
Session history Saved sessions, including their full conversation files, so you can resume on another machine ~/.autohand/sessions/
Share queue Pending /share uploads ~/.autohand/share/

These are never synced: device-id, error.log, feedback.log, version-*.json, sync lock and state files, memory/derived/, and temporary files. Telemetry and feedback data sync only if you opt in (see Optional sync items).

How sync works

Sync talks to the Autohand API (https://api.autohand.ai), which hands out upload and download URLs for cloud storage (Cloudflare R2).

  1. Start - When Autohand starts and you are signed in, it runs a sync, then repeats it on a timer (every 5 minutes by default) for as long as it runs.
  2. Compare - Autohand builds a manifest of the synced files (path, SHA-256 hash, size, modified time) and compares it with the cloud manifest.
  3. Download - Files that are new or newer in the cloud are downloaded first.
  4. Upload - Files that are new or newer locally are uploaded. config.json is encrypted before upload; other files are uploaded as they are.
# The sync cycle in practice
# 1. You change a setting on your laptop
autohand config set openai.model "gpt-5.4"

# 2. On the laptop's next sync, config.json uploads (encrypted)
# 3. Your desktop downloads it on its next sync
# 4. Both machines now use the same OpenAI model

Sync intervals

The default interval is 5 minutes. Set sync.interval in milliseconds to change it:

{
  "sync": {
    "enabled": true,
    "interval": 120000
  }
}

Frequent polling increases network usage without much practical benefit, since most configuration changes are infrequent.

Conflict resolution

When a file differs between your machine and the cloud, the copy with the later modified time wins and replaces the other. See Conflict resolution.

Enabling sync

Sync is on by default once you sign in. It needs an Autohand sign-in; API keys alone are not enough.

# Sign in (required)
autohand login

# Inside a session, check sync status
/sync

The /sync command

Inside a session, /sync opens a view with three tabs: Status (enabled, running, last sync, files tracked, total size, interval), Settings (interval, telemetry and feedback opt-ins, what syncs) and Activity. Press s to sync now, e to turn sync on or off, Tab to switch tabs and Esc to close.

Configuration file

Set the sync block in ~/.autohand/config.json. Every key is optional:

{
  "sync": {
    "enabled": true,
    "interval": 300000,
    "exclude": [],
    "includeTelemetry": false,
    "includeFeedback": false
  }
}

Turning sync off

  • Set "sync": { "enabled": false } in ~/.autohand/config.json, or press e in /sync.
  • Run with --bare, which turns sync off for that run.
  • Sign out with autohand logout; sync does not run without a sign-in.

The --sync-settings flag does not turn sync on when sync.enabled is false. In CLI 0.9.8, --sync-settings false does not turn sync off either, so use the config setting.

Excluding files from sync

Use the sync.exclude array to keep files or folders on one machine. Session history is a common candidate, because it holds full conversations:

{
  "sync": {
    "enabled": true,
    "exclude": [
      "sessions/",
      "projects/",
      "*.log"
    ]
  }
}

How patterns match

Pattern What it excludes Rule
sessions/ All saved sessions A pattern without * excludes every path that starts with it
projects/ Per-project knowledge Same prefix rule
*.log Any file ending in .log * matches any characters, including /, against the full path or the file name
skills/my-* Skills whose folder starts with my- Same wildcard rule

Paths are relative to ~/.autohand/. Open /sync to see how many files are tracked after a change.

Conflict resolution

Conflicts happen when the same file is edited on two machines before either one syncs.

Default behavior: newest wins

When a file’s hash differs between your machine and the cloud, Autohand compares modified times. If the cloud copy is newer, it is downloaded and replaces your local file. If your local copy is newer, it is uploaded and replaces the cloud copy. No backup of the replaced copy is kept, so keep files you care about under version control.

Exceptions

  • Memory event log: the two versions are merged instead of one replacing the other.
  • config.json: a downloaded config keeps your local auth and mcp keys, so signing in and MCP servers stay per machine.

Manual resolution

To make sure one machine’s copy wins, edit the file there last, then press s in /sync to sync it before the other machine does. To keep a file out of the exchange entirely, add it to sync.exclude.

Optional sync items

Two categories are off by default. You can opt in to each one.

Telemetry data

Set includeTelemetry to add ~/.autohand/telemetry/ to sync:

{
  "sync": {
    "enabled": true,
    "includeTelemetry": true
  }
}

This does not change what telemetry collects. It only syncs the local telemetry folder across devices.

Feedback data

Set includeFeedback to add ~/.autohand/feedback/ to sync:

{
  "sync": {
    "enabled": true,
    "includeFeedback": true
  }
}

Both default to false.

Security

Encryption details

  • config.json: encrypted on your machine with AES-256-GCM and a random IV before upload. The key is derived with PBKDF2 (SHA-256, 100,000 iterations) from your Autohand sign-in token.
  • Other files (agents, skills, hook scripts, memory, project knowledge, sessions, share queue): uploaded without client-side encryption.
  • Never uploaded: your sign-in (auth), MCP server settings (mcp), and the paths listed under What syncs as never synced.
  • Transport: the API base URL must be HTTPS (plain HTTP is accepted only for a local loopback address).

What is not synced

  • Project source code and git history (sync only reads ~/.autohand/)
  • Project-level .autohand/ folders
  • Anything you list in sync.exclude

Lost or compromised devices

The CLI has no command to list or revoke synced devices. If a device is lost, sign out of your Autohand account there if you can, rotate any provider API keys stored in config.json, and contact Autohand support.

Troubleshooting sync

If sync is not working as expected, work through these common issues.

Sync is not starting

Symptom Cause Fix
“Settings sync requires authentication” in /sync You are not signed in Run autohand login and try again
/sync shows Enabled: No sync.enabled is false Press e in /sync, or remove the setting
Service Running: No The run used --bare, or sync stopped after a sign-in error Start without --bare; if you saw “Session sync failed”, run /logout and /login
Sync fails Network connectivity issue Check your internet connection and any proxy settings

Stale data on a device

Open /sync and press s to sync now. The Status tab shows the last sync time and the number of files tracked.

Debug logging

Run Autohand with --debug for verbose output while you reproduce the problem.

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification