Drev: Claude Code sessions over git

By Fuat Can Köseoğlu,

Claude Code stores each session as a JSONL at ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl. The file is single-user by design: it has absolute paths to the producer's working tree, encoded directory names, and references that only resolve on the machine where the session ran. When work moves between engineers, that file does not. Drev is a TypeScript CLI that moves it. The producer runs drev share , the JSONL, and a meta.yaml get pushed to a Git repo your team already controls. The consumer runs drev resume, drev pulls, and rewrites every absolute path inside the JSONL to match the consumer's tree, drops the file at the consumer's <encoded-cwd>, and spawns claude --resume. The receiver lands in the same conversation, with a full tool-call history. It is not an invention; it is integration. Git carries the file; a path rewriter handles the OS gap; regex redaction guards secrets; and Claude Code's own resume picks up the rest. The interesting part is what falls out of treating Git as the backend: No server. Any Git remote works (GitHub, GitLab, self-hosted, or SSH-only box). Nothing to deploy, nothing to keep alive after I lose interest. No P2P. Git is the rendezvous. Sender pushes, goes offline; the receiver pulls hours later. Asynchronous is the only mode, which is also the only one that survives PTO and time zones. No auth. Identity is the git user.email. Anyone with write access shares; anyone with read access resumes. No Drev account , no Claude account binding. Cross-platform. Windows to macOS, either direction. The path rewriter normalizes separators and swaps roots. These are properties, not features. Once git is the backend, you can't have a hosted service even if you want one. The load-bearing parts Two files in src/core/ carry the product. The rest is glue. path-rewriter.ts rewrites every absolute path in the JSONL: JSON-escaped form before raw, split/join instead of regex to dodge metacharacters, boundary checks so /Users/fu doesn't match inside /Users/fuat, and normalizes separators (Claude Code uses forward slashes internally even on Windows). redaction.ts scans for credentials before push: Anthropic, OpenAI, GitHub, AWS, Slack, JWTs, Stripe, Google, and PEM private keys. The AWS secret-key pattern is intentionally aggressive (40-char base64 with boundary lookarounds): false positives are harmless; false negatives are catastrophic. For misses, drev scrub --confirm rewrites history via git filter-repo. Limits Sessions are plaintext in your repo, so trust the host the way you trust your source. The SessionEnd hook is best-effort across Claude Code versions; for sessions you definitely want shared, ask Claude in-session ("save this as foo") so it runs synchronously. drev resume spawns claude --resume as a subprocess that needs a TTY, so it has to run from a fresh terminal, not from inside an active session. More: Codeturion/drev: Make Claude Code sessions portable: share them with friends and teammates, or resume them on any machine.