# Reinstate - Harjot Singh Rana

Canonical URL: https://www.harjotrana.com/projects/Reinstate

> Open-source Go CLI for coding-agent session continuity. Finds and resumes Claude Code and Codex sessions locally, and syncs them across macOS, Windows, Linux, and WSL2 through client-side age encryption and your own S3-compatible storage—with OS-aware path remapping so resume works after a machine switch.

## Links

- GitHub: https://github.com/HarjjotSinghh/reinstate
- Live: https://reinstate.dev

## Case study

### Situation

Reinstate addresses a specific gap in AI-assisted development: the code survives a device switch, but the agent's working context does not. A session started on one machine should be findable and resumable on another without leaving the agent's local storage behind.

### Constraint

Agent sessions are vendor-specific and contain absolute paths, sensitive files, and state that should not be copied blindly. Sync needed to preserve native resume while handling path remapping, credential exclusion, conflicts, backups, and offline use.

## Stack

Go, age, S3, GitHub Actions

## What I built

- Built Claude Code and Codex adapters that find sessions and restore them natively.
- Added client-side age encryption and your own R2/S3 bucket, so it holds only ciphertext.
- Hardened restore: path remapping, credential denylist, dry runs, atomic writes, backups.

## Outcome

Passed 23/23 Mac–Windows acceptance tests for path remapping and conflict-safe restore. The result is an Apache-2.0 CLI that keeps the user's bucket, keys, and agent sessions under their control.

- Role: Creator and maintainer
- Timeline: July 2026 · ongoing
- Technical detail: Go; Cobra; age; S3-compatible storage; OS keyring; path mapping; atomic restore; GitHub Actions.

Discuss a systems build: https://www.harjotrana.com/hire

## Key features

- Configless local index and search across sessions, prompts, files, projects
- Native resume, last, and fork for Claude Code and Codex
- Encrypted push/pull via age and user-owned S3-compatible storage
- OS-aware path remapping so --resume works after switching machines
- Pre-launch checks for workspace, agent layout, and capabilities
- Interactive TTY switcher with deterministic JSON for automation
- Read-only discovery for Gemini CLI and OpenCode sessions
- Apache-2.0: no Reinstate account; your bucket, your keys

All projects: https://www.harjotrana.com/projects

---

Site guide for agents: https://www.harjotrana.com/llms.txt · Full site as Markdown: https://www.harjotrana.com/llms-full.txt · Sitemap: https://www.harjotrana.com/sitemap.xml · Developer resources: https://www.harjotrana.com/developers