[Bug]: recovery recover-config reports ready for a config that prevents Gateway startup`

Author: safe-openclawCreated Aug 9, 2026Updated Sep 16, 2026
Labelsbug

OpenSquilla version or commit

0.5.2

Area

Web UI

Reproduction steps

  1. Use the Control UI to create a custom Agent in a clean profile.

  2. Confirm that the generated config contains an inline Agent table:

    toml
    agents = [
        { id = "qa-agent", name = "QA Agent", enabled = true },
    ]
  3. Restart the Gateway. It fails with migration_failed_manual_recovery_required and LosslessTomlPatchError.

  4. Run the recovery command described by its help text:

    powershell
    opensquilla recovery recover-config --home <profile-home> --json
  5. Try to start the Gateway again.

Expected behavior

recover-config should preserve the startup-breaking config as config.toml.corrupt.<stamp>, restore the newest usable sibling backup, and allow the Gateway to start, matching the command's help text.

Actual behavior

The command returns an outcome of ready with stable_code: canonical_workspace. It does not create a config.toml.corrupt.* copy, does not replace the config, and the next Gateway start fails with the same migration error.

The config is syntactically valid TOML, but it is incompatible with the lossless migration patcher. The recovery check appears to validate a different condition and misses the startup failure.

Environment

Windows 11 10.0.26200 x64; source install; CPython 3.12 managed by uv 0.11.29.

Diagnostic bundle and error reference

No response