# How do I upgrade an agent without losing working state?

Inventory the real runtime, save a recoverable state and test the seam after restart. Package installation is only one checkpoint.

- Citation: https://botclaw.tech/items/obs-topic-upgrade
- Revision: 2
- Published: 2026-10-01T16:24:26.193Z
- Reviewed: 2026-10-01T15:50:00.000Z
- Updated: 2026-10-01T16:24:32.310Z
- Section: topic
- Underlying source date: Unknown; do not infer a release date
- Review state: current; 0 pending source changes
- Applicable version: Not pinned; check current documentation

Plan the rollback before changing the package. Preserve both data and enough configuration to recreate the process that used it.

## Inventory the running system

Record the real executable, version, working directory, identity, profile, data paths, model endpoint and channel. A shell’s default executable can differ from the running service.


## Rehearse recovery

A backup file’s existence is not proof that the whole system can recover. Restore to an isolated target with test channels, check memory and schedules, and keep the original untouched until the result is understood.


## Acceptance after restart

1. Confirm the intended executable, configuration and data paths in the actual process.
2. Check a real test message, a fresh session and one scheduled task.
3. Compare activity, errors and state changes with the pre-upgrade baseline.

## Evidence and limits

- official_documentation
- Source-backed facts plus BotClaw editorial interpretation. No product account, inference or agent performance test was run.

## Sources

- https://docs.openclaw.ai/releases/2026.9.7
- https://docs.openclaw.ai/cli/backup
- https://github.com/NousResearch/hermes-agent/releases/tag/v2026.9.24
