{"slug": "gobag-semantic-session-archival-for-claude-code", "title": "Gobag: Semantic session archival for Claude Code", "summary": "Developer satmihir released gobag, an open-source plugin for Claude Code that checkpoints a session's context, decisions, and pinned Git commits into a single encrypted .gobag file for restore on another machine. The plugin installs a checksum-verified gobag binary and is invoked with /checkpoint and /restore commands, storing repositories as remote URLs and pinned commits rather than copying them, so uncommitted and unpushed work does not travel. gobag is Apache 2.0 licensed, uses age passphrase encryption by default, and treats repositories larger than 1 GB as external, attaching a detached worktree to an existing clone instead of cloning them.", "body_md": "**Checkpoint a Claude Code workspace and pick it up somewhere else.**\n\ngobag saves the useful parts of a Claude Code session: what you were doing,\nwhy you made certain decisions, the files that matter, and the exact commits\nyou were working from. It puts them in a single encrypted `.gobag` file.\n\nOn restore, gobag rebuilds the workspace from Git and writes an\n`ORIENTATION.md` explaining what changed in the meantime, including movement\nin the pinned branches and their base branches. The new session gets both sides\nof the handoff: the previous session's notes and the current state of the\nrepositories.\n\nRepositories are stored as remote URLs and pinned commits, not copied into the archive. This keeps bags small, but it also means uncommitted and unpushed work does not travel. gobag warns about both before packing.\n\nAdd the plugin in Claude Code:\n\n```\n/plugin marketplace add satmihir/gobag\n/plugin install gobag@gobag\n```\n\nThe plugin installs a pinned, checksum-verified `gobag` binary the first time\nit needs one.\n\nIn the session you want to preserve, run:\n\n```\n/checkpoint\n```\n\nThe session reviews the work it actually used, writes a handoff, and asks gobag to verify and pack it. Archives are encrypted by default, so you will be prompted for a passphrase.\n\nMove the resulting `.gobag` file however you normally move files. In a fresh\nClaude Code session, run:\n\n```\n/restore /path/to/work.gobag\n```\n\nRestore is safe to retry. Existing files are not overwritten; when a carried\nfile conflicts, the archived copy is written alongside it with a\n`.from-gobag` suffix. Dirty or diverged repositories are left alone and called\nout in `ORIENTATION.md`.\n\nFor longer work, you can keep a plain-text record in the workspace instead of writing a handoff only when you leave:\n\n```\ngobag stage init\n# keep .gobag/stage/HANDOFF.md up to date\ngobag stage status\ngobag seal -label \"before the auth rewrite\"\n```\n\nThe plugin hooks refresh repository facts at session boundaries. If Claude's context is compacted after the handoff was last edited, the plugin nudges the session to read and revise it. Nothing runs in the background, and the hooks do nothing in workspaces without a stage.\n\nThe stage is unencrypted because it stays inside the workspace. `gobag seal`\nis the boundary for anything you intend to move elsewhere.\n\nThe binary also works on its own:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/satmihir/gobag/main/scripts/install.sh | sh\n\ngobag pack /path/to/workspace -o work.gobag\ngobag inspect work.gobag\ngobag install work.gobag --root /path/to/restore\ngobag verify work.gobag\n```\n\nWalk mode finds Git repositories plus conventional `HANDOFF.md`, `context.md`,\nand project-local Claude skills. A `/checkpoint` is usually better because the\nsession can identify context outside the current directory and explain the\nreasoning that a filesystem walk cannot see.\n\nRepositories larger than 1 GB are treated as external by default. gobag does not clone them during restore; it attaches a detached worktree to a clone that already exists on the target machine:\n\n```\ngobag link repos/monorepo /path/to/existing/clone\n```\n\nThat location is remembered for later restores on the same machine. The existing clone's checked-out branch is never moved.\n\n- Claude Code only; gobag does not try to preserve or revive a live process.\n- Committed Git refs travel. Uncommitted changes do not.\n- Transcripts are optional and are not used to restore context.\n- Archives use age passphrase encryption unless `--plaintext` is explicit.\n- Agent-written plans are verified, and carried files are scanned for likely secrets before packing.\n- There is no daemon, account, server, or sync service. The archive is yours to store and move.\n\nThe implementation and its tradeoffs are described in [DESIGN.md](https://github.com/satmihir/gobag/blob/main/DESIGN.md).\nContributor constraints live in [CLAUDE.md](https://github.com/satmihir/gobag/blob/main/CLAUDE.md).\n\nApache 2.0. See [LICENSE](https://github.com/satmihir/gobag/blob/main/LICENSE).", "url": "https://wpnews.pro/news/gobag-semantic-session-archival-for-claude-code", "canonical_source": "https://github.com/satmihir/gobag", "published_at": "2026-09-21 17:09:57+00:00", "updated_at": "2026-09-21 17:24:36.506066+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["gobag", "Claude Code", "satmihir", "Git", "Apache 2.0"], "alternates": {"html": "https://wpnews.pro/news/gobag-semantic-session-archival-for-claude-code", "markdown": "https://wpnews.pro/news/gobag-semantic-session-archival-for-claude-code.md", "text": "https://wpnews.pro/news/gobag-semantic-session-archival-for-claude-code.txt", "jsonld": "https://wpnews.pro/news/gobag-semantic-session-archival-for-claude-code.jsonld"}}