After a long task the .dsh directory is damaged
Discussion #13174 says the harness directory (.dsh) can be flushed during a long task, so the data underneath is lost or damaged. The report: after several longer tasks an error appeared, and after restart the earlier conversations were corrupted. Asking the agent to repair them did not help. A file-recovery pass brought back roughly 70 to 80 percent. The post attaches host crash logs and does not name a supported session-repair command.
Fix it by hand
- Quit dsh immediately. Do not start another task, and do not ask the agent to repair the home.
- Copy the remaining $DSH_HOME, default ~/.dsh, to another disk before anything else writes to it. Include $DSH_AGENTS_HOME if you set it.
- If you already have an archive from before the long task, move the damaged home aside and unpack that archive. Do not unpack it on top of the damaged tree.
- There is no verified dsh command that rebuilds a corrupted session log. A partial file-recovery copy is still a copy: keep it separate from the live home.
A snapshot or tar taken after the flush only preserves the damaged tree. The useful copy is the one made before the long task.
Optional encrypted snapshot
Optional. UndoHaven is an unofficial third-party, compatible with dsh. Copy the directory by hand first, then use an encrypted snapshot if you want one.
npx undohaven init
- Install: copy this command.
- First snapshot: it stays encrypted on this machine.
- Roll back: undohaven restore --to SNAPSHOT_ID
Free covers 7 days of history and 1 device. Pricing