Migration guide
This guide walks through upgrading Veyyon and recovering when an upgrade does not go as planned. Veyyon stores all user data under the config home (~/.veyyon on Unix by default, the Veyyon application directory on Windows; relocatable with VEYYON_CONFIG_DIR), so most upgrades are safe if you back up that directory first.
Before you upgrade
-
Close all running Veyyon sessions and TUI instances. Writes may still happen while the binary is running, and a backup taken during activity can be inconsistent.
-
Back up the config home:
cp -R ~/.veyyon ~/.veyyon-backup-$(date +%Y%m%d)Keep this backup until you have verified the new version with
veyyon plugin doctorand completed one normal session. -
Read the release notes for the version you are installing. They list required config changes, renamed fields, and any new dependencies.
Config schema updates
Profile settings live in ~/.veyyon/profiles/<name>/agent/config.yml (default profile: profiles/default/agent/config.yml). Global cross-profile keys (for example defaultProfile) live in ~/.veyyon/config.yml. The binary validates settings against the schema and reports the file, the dotted setting key, and the reason on failure.
Common schema changes
- New keys arrive with a schema default, so a missing key is never an error; the default applies until you set your own value.
- Renamed fields are migrated automatically where a migration exists, and the file is rewritten in the new spelling.
- Removed or unknown fields are preserved silently and never block startup (they may belong to a newer build or another tool). Delete them yourself to keep the file clean.
Updating your config
-
Edit
~/.veyyon/profiles/default/agent/config.yml(or the active profile agent dir). Use~/.veyyon/config.ymlonly for global keys such asdefaultProfile. -
Run the new binary once to see any validation errors:
veyyon --version veyyon plugin doctor -
Fix each reported line. If you are unsure what a key does, see Configuration and File locations.
-
After editing, run
veyyon plugin doctoragain to confirm the file loads cleanly.
You do not need to rewrite the whole file. Most upgrades only add or rename a few keys, and the rest of your settings stay the same.
Session and state data
Session data lives under the profile agent dir (~/.veyyon/profiles/default/agent/ by default):
sessions/: append-only JSONL rollouts (conversation history, branching).- SQLite stores under the agent dir (for example
history.db,agent.db) mirror lookups; they can be rebuilt from rollouts when missing.
This means you usually do not need a manual database migration. When you start the new binary, it reads the rollout files and updates the state database as needed. If you see a warning about a stale state database, the binary repairs it automatically on startup.
If you need to force a state rebuild
- Close Veyyon.
- Remove the state database file (see File locations for the exact path on your platform).
- Restart Veyyon. Indexes rebuild from agent-dir
sessions/rollouts.
Never delete sessions/ to fix a state problem. Rollouts are the durable history; SQLite stores under the agent dir are caches/indexes.
Rolling back a binary
If the new binary does not work for you, you can go back to the previous version without losing data.
- Close all Veyyon processes.
- Restore the previous binary. Run
veyyon rollbackto pick an earlier version, or re-run thecurlinstaller with--ref v<version>to pin that release binary (fetched from GitHub Releases). If you run Veyyon out of your own git checkout instead, go back withgit checkout v<version>and rebuild. - Restore profile
config.yml(and global~/.veyyon/config.ymlif you changed it) from the backup you made before upgrading, if the new version modified settings the old version cannot read. - Leave agent-dir
sessions/, archives, and SQLite stores in place. Rollout files are forward-compatible for recent releases; the old binary can rebuild indexes when needed. - Start Veyyon and run
veyyon plugin doctorto confirm the environment is healthy.
If you used a new feature that wrote settings the old binary does not recognize, remove or rename those keys before starting the old binary. The error message will point you to the right lines.
Checking health after an upgrade
After every upgrade, confirm the install is healthy:
veyyon --version
veyyon plugin doctor
veyyon plugin doctor checks plugin installation health (directories, manifests, entry paths, enabled
features); it exits non-zero when a check reports an error. Binary and provider-key checks live in
veyyon setup status. Start a normal interactive session and run
/debug and /memory diagnose to confirm the runtime and memory backend are working.
Treat every failed check as actionable. Fix the reported line, then re-run. If a check fails after a
rollback, compare your config.yml against the backup from before the upgrade. See
Troubleshooting for the common failure modes and
Diagnostics and health for the full diagnostics surface (veyyon plugin doctor, TUI /debug).
Where to go next
- Configuration explains the settings that change between releases.
- File locations lists every path under the config home.
- Troubleshooting walks through common upgrade failures.
- Diagnostics and health covers the diagnostics surface in detail.