Home / Blog / How to recover what you want from Claude sessions without…
Tech News

How to recover what you want from Claude sessions without restarting?

I'll pull the source repo and HN thread so the paragraphs stay factual and specific.Aniketh Maddipati published **claude-recovery**, a public beta plugin for…

By Dillip Chowdary • Aug 06, 2026 • Source: HN Claude/Codex/Fable

How to recover what you want from Claude sessions without restarting?

I'll pull the source repo and HN thread so the paragraphs stay factual and specific.Aniketh Maddipati published **claude-recovery**, a public beta plugin for Claude Code that targets selective salvage when a mixed attempt leaves both useful and rejected work in the tree. The project is at version **0.1.2**, MIT-licensed, and tested against Claude Code **2.1.x**. On Hacker News the thread sat at **2** points with **1** comment. The pitch is narrow: native rewind rolls time backward; this tool keeps developer-chosen whole files and hands a fresh session an explicit Recovery Contract so you do not have to restart from zero or throw away the good parts of a bad attempt.

Mechanically it is a developer-driven pipeline, not an auto-judge. You invoke **/claude-recovery:recover**, choose keep, reject, or change per artifact, review a Recovery Contract, and approve it. Finalize then builds a clean Git worktree with only the selected whole-file patches, freezes the decision, and refuses if **decision.json** or the plan changed after approval. A plugin-scoped SessionStart hook injects the approved contract into a new session; headless **claude -p** and manual paste are fallbacks. Evidence stays local under **.claude/recovery/** (prompts, bash command logs, git evidence, decisions). Runtime needs are thin: Claude Code CLI, Git, Node.js **22+**, Node built-ins only, no npm install. V1 is whole-file patches only; it does not recover hidden reasoning, detect that an attempt is wrong, or launch Claude for you.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

For engineers running agentic coding loops, the costly failure mode is not total loss but partial success: a useful compatibility test landed next to a bad API migration, or a solid helper sat beside a rejected refactor. Chronological **/rewind** discards everything after a checkpoint. **/branch** and **/fork** continue conversation state when the work is still valid. **claude-recovery** fills the gap where the filesystem state is mixed and you want salvage plus a boundary document the next session must respect. That matches how real agent sessions fail—useful and harmful edits interleave—so recovery has to be surgical and human-approved, not all-or-nothing.

In market terms this sits beside Claude Code’s native rewind, branch/fork, and worktree isolation rather than replacing them. It is closer to a disciplined Git worktree plus contract handoff than to generic “session restore” marketing. Competitive pressure is high in coding agents (Claude Code, Codex, and similar CLI tools), where context loss and messy diffs burn hours. A small beta with explicit limitations, local-only artifacts, and mechanical finalize checks is a different bet from opaque auto-resume: trust stays with the developer, and the plugin enforces process rather than claiming semantic understanding of whether the attempt was right.

Practical takeaway: use it when you already know which files to keep and which to discard, after a mixed attempt, not as general crash recovery. Install via **claude --plugin-dir** (or marketplace if your CLI accepts the manifest), run recover on a dirty tree, approve the contract, then manually open Claude in the printed worktree path. Watch finalize refuse on post-approval decision drift, boundary verification against the base SHA, and whether SessionStart actually injects **pending-contract.json**. Before sharing demos or worktrees, scrub **.claude/recovery/**—prompts and bash output can hold secrets. If the contract never appears in the new session, confirm you launched from the recovery worktree and that the pending contract is marked approved.

Advertisement

🔎 More interesting news

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →