DeepSeek Harness

DeepSeek Harness: Recover an Interrupted Profile Reset

· 7 min read · 中文版

An interrupted custom-profile reset can leave the old profile in a staging directory beside the target. Preserve and inspect that directory before attempting another reset; a later boot failure is a different case and may leave the new profile in place.

DeepSeek Harness: where can the previous profile be found?

The CLI reference documents the reset option --from-default-profile: it builds a fresh custom profile in a staging directory beside the target, then moves it into place. If restoration after a failed move also fails, or the process stops between the two renames, the previous directory remains at $DSH_HOME/profiles/.<name>.staging-*/previous for manual recovery. The wildcard represents a staging directory name; it is not one fixed path.

For a custom profile named rescue, inspect the matching hidden staging directories under $DSH_HOME/profiles/ and look for their previous children. There can be more than one candidate. Record their paths and contents before deciding which is the old profile. The reference does not specify an automatic command that selects the correct candidate or restores it. The plugin configuration guide explains why the configuration and plugin schema matter after recovery: plugin configuration is validated and schema defaults can be applied when a plugin loads.

An interrupted reset can leave the previous profile inside staging; preserve it and compare before recovery

DeepSeek Harness: did the reset actually fail during replacement?

Distinguish the replacement step from application startup. The reset is committed before bundle resolution and application boot. If either later stage fails, the fresh profile remains on disk; the failure does not imply that the old directory is still available in staging. A successful replacement deletes the prior target, including its installed dependencies and user patch. The documented staging location is a recovery path for the specified interrupted or failed-restore cases, not a backup guarantee after every reset.

ObservationDocumented implicationNext investigation
Process stopped between renamesPrevious directory remains in stagingLocate and preserve previous
Move failed and restoration also failedPrevious directory remains in stagingPreserve the candidate before changing the target
Replacement committed, boot later failedNew profile remains on diskInspect the boot error and any independent backup
Replacement succeededPrevious target was deletedUse an independent backup if one exists

The documentation says a failed move normally restores the previous directory. Check the actual target and staging contents rather than inferring the outcome from a missing success message: successful replacement adds no launcher output. An unknown template or a shipped profile name as target fails before the target changes, according to the reference.

DeepSeek Harness: how should I recover the old files?

  1. Stop further reset attempts and identify the actual DSH_HOME, custom profile name, and affected machine. A different home points to a different profile tree. Do not assume the currently visible profile is the original.
  2. Inspect $DSH_HOME/profiles/.<name>.staging-*/previous using a file browser or appropriate local tools. Hidden directories may need to be shown. Record all candidate paths and distinguish the previous directory from the new target and staging contents.
  3. Make a separate copy of each plausible candidate and of the current target before changing either. Preserve the original directory structure, including the manifest, user patch and installed dependencies if present. Check permissions and available storage with the local operator.
  4. Compare the candidate manifest, cordis.patch.yml, installed packages and any known backups with the expected profile. Check timestamps as supporting evidence, not proof. Choose a recovery method appropriate to the environment; the reference gives the location but not a universal restore procedure.
  5. With the affected profile stopped, restore from the verified copy only after preserving the current target. Start it without the reset option and check startup diagnostics and a small representative task. Keep the untouched copy until the recovered setup has been reviewed.

If there is no candidate, do not create a new profile under the same name and assume it recovers the old files. Search independent backups or ask the operator responsible for them. If recovery is uncertain, preserve the evidence and investigate before replacing anything.

DeepSeek Harness: what does the reset replace?

The CLI reference says dsh --profile <name> --from-default-profile <template> replaces a custom target with a fresh copy of a shipped template before boot. Valid templates are web, headless, sdk, sdk-minimal, and acp. A shipped profile name cannot be the target, regardless of letter case. The new manifest has the template's current bundle list, empty dependencies and an empty user patch. It does not copy the local profile named by the template, its installed dependencies or patch, and it does not establish inheritance from it.

For example, the reference shows dsh rescue --from-default-profile web followed by dsh rescue. The first command resets rescue; the second boots it without resetting. These are illustrative commands, not instructions to run the first command during recovery. Even --dump-config, --dump-default-config, and --dump-config-schema accept the reset option and replace the target without booting it. Remove the option when the intention is inspection rather than replacement; a dump of a missing profile can itself initialize files.

The home-level $DSH_HOME/cordis.patch.yml is separate from the profile's own patch and is applied afterward. Recovery of a profile directory alone therefore does not establish that the same effective configuration will result. Explicit --patch overlays can also affect composition. Compare the active inputs and consult configuration layer precedence when the recovered profile behaves differently.

DeepSeek Harness: what are the limits and safety boundaries?

The staging mechanism is not described as a versioned backup system, and the reference gives no retention promise for successfully replaced profiles. Repeating the reset can overwrite the target state you need to compare. Do not delete candidates merely because a new profile boots; the old patch or dependency list may still be needed to understand its behavior.

Profile patches and diagnostics may contain credentials or sensitive paths. Restrict access to copies and inspect them before sharing. A schema-valid configuration is not evidence that restored code or settings are trustworthy. Review installed packages and the complete configuration before running an unfamiliar recovered profile; a plugin's configuration is checked against its schema, but validation does not certify its effects.

DeepSeek Harness: what do the terms mean?

  • Profile: a named configuration and dependency directory selected by the launcher.
  • Template: one of the shipped starting configurations copied into a custom target by the reset option.
  • Staging directory: a temporary sibling used to prepare the replacement; its previous child can hold the old target in the documented failure cases.
  • User patch: the profile's cordis.patch.yml, a layer of plugin configuration.
  • Home patch: the shared $DSH_HOME/cordis.patch.yml, applied after the profile patch.

Frequently asked questions

Where can the old profile remain?

In the documented interrupted or failed-restore cases, it remains under the matching staging directory in its previous child.

Does every failed boot retain the old profile?

No. Replacement commits before boot, and a later boot failure leaves the new profile on disk.

Can a configuration dump reset the target?

Yes, if the reset option is supplied. The three documented dump modes accept it.

Sources

Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.

  1. CLI behavior reference
  2. Plugin configuration

This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.

← Back to all articles

DeepSeek Harness: Recover an Interrupted Profile Reset