intow keeps Claude Code chat history, memory and per-folder settings attached to a folder after you move or rename it. You can rename the folder in Finder, in your editor or with mv. The next Claude session in the new place has its past sessions in /resume, its auto-memory and its permissions back. You don't need to remember a special command.
The name: the folder moves, and its history comes along in tow.
Claude Code stores everything about a folder under the folder's absolute path:
| What | Where |
|---|---|
Sessions (/resume, --continue) |
~/.claude/projects/<encoded path>/*.jsonl |
| Auto-memory | ~/.claude/projects/<encoded path>/memory/ |
| Trust, allowed tools, MCP choices | "projects"."<path>" in ~/.claude.json |
If you rename ~/code/app to ~/code/app-v2, Claude starts from nothing there. The old data stays behind under a name nothing points to any more.
Other tools can carry the data across, for example claude-mv, ccmv, claude-repath, mvcp and claude-code-project-mover. They do the job well when you remember to use them instead of mv. intow is for the times you don't: it notices the move on its own.
Claude Code plugin (recommended):
/plugin marketplace add p10node/intow
/plugin install intow@intow
The first time the plugin runs, it downloads the intow binary for your platform (about 1.6 MB) from the GitHub release that matches the plugin version. The plugin carries the SHA-256 of that binary in its own checksums.txt and runs nothing else, so a replaced release asset is rejected. /intow:status lists the folders intow knows about and helps you re-attach history that moved before you installed it.
Homebrew:
brew install p10node/tap/intow
intow install # adds the SessionStart hook to ~/.claude/settings.jsonOn Windows, use the plugin, or take intow.exe from the releases and run intow install.
Script (macOS and Linux; installs to ~/.local/bin):
curl -fsSL https://raw.githubusercontent.com/p10node/intow/main/scripts/install.sh | sh
intow installUse the plugin or intow install, not both. If both are present the second run finds nothing to do, so nothing breaks.
Shell function (optional, for claude --continue and claude --resume):
eval "$(intow shell-init)" # zsh, bash; put it in ~/.zshrc or ~/.bashrc
intow shell-init fish | source # fish
intow shell-init powershell | Out-String | Invoke-Expression # PowerShell; put it in $PROFILEClaude Code looks for the session to continue before it runs any hook. Right after a rename, claude --continue therefore ends with "No conversation found to continue" and asks you to trust the folder again, and the hook never gets its turn. The function runs intow sync --apply -q first, which takes a few milliseconds, and then starts Claude. With only the plugin installed, intow is not on your PATH: run /intow:shell in Claude Code, which prints the same function with the plugin binary's path.
VS Code extension (optional, for the Claude Code extension's Session Manager and its trust prompt): vscode/ in this repository.
In an editor the hook runs when Claude Code starts in the window, which is when you open its panel or its Session Manager. For two things that is a moment too late (seen with version 2.1.330 of the Claude Code extension):
- The Session Manager in the side bar has already read its list. For a renamed folder it says "No sessions yet", and it keeps saying so until the window is reloaded.
- If you open the panel first, it asks whether you trust the folder, although the trust you gave follows a few seconds later.
The history popup in the panel is not affected: it reads the list every time it opens. The extension runs intow sync --apply at window startup instead, before either of these. It needs the intow binary from one of the installs above.
- Record. When a Claude session starts, a
SessionStarthook records the folder's filesystem identity: its device, inode and birth time. A directory keeps this identity when it is renamed or moved within a disk. - Find. Later, if a recorded path no longer exists, intow looks for the same identity:
- On macOS it asks the kernel directly, through
/.vol/<device>/<inode>andfcntl(F_GETPATH). This is exact. - On Linux it searches near the old location for a directory with the same inode and birth time.
- On Windows it asks the volume for the folder's file ID (
OpenFileById). This is exact on NTFS and ReFS.
- On macOS it asks the kernel directly, through
- Re-key.
- It renames
~/.claude/projects/<old>to<new>, or merges the two if Claude already created<new>. Memory indexes are merged line by line. - It rewrites the
cwdfield in the session files and keeps their modification times, so/resumekeeps its order. - It moves the folder's entry in
~/.claude.json, keeping the key order. Lists are combined, and trust stays granted. The folders listed undergithubRepoPathsare updated too. - It updates
history.jsonland the folder recorded for project-scope plugins inplugins/installed_plugins.json. - Subfolders move along with the folder.
- It renames
- Tell Claude. If the session that is starting is in the moved folder, the hook also passes the folder's
MEMORY.mdto it.
intow runs only when Claude starts (or just before, with the shell function), and it adds a few milliseconds. It has no background process, adds nothing to Login Items and asks for no new privacy permission, because it runs as part of Claude Code.
On macOS a rename that only changes the case of the name (app to App) is followed too. The old name still opens the folder there, but Claude Code keys its data by the exact spelling.
It deliberately leaves a folder alone in these cases:
- The folder is in the Trash.
- Claude is still running in the old path. intow retries at the next start.
- The old path now holds a different folder, for example after
mv app app-oldand a fresh clone intoapp. The history under that path could belong to either, so it stays. intow remembers the folder that was moved aside, and the hook andstatusprint theintow link --forcecommand that hands the history to it. - Claude Code names project folders differently than intow expects, because a new version changed the scheme. intow compares the two at every session start and pauses itself instead of moving data to a place Claude does not read. A session started with
CLAUDE_CODE_PROJECT_DIR_NAMEis left alone as well: its data does not depend on the path.
The approach, the rules for carrying state across a move and what an agent could do about it natively are written up in RFC 0001: Follow the folder, not the path.
| Command | What it does |
|---|---|
intow status |
Lists the folders Claude knows about: ok, moved, orphan, trashed, untracked, temp, unknown (the data names no folder). For orphans it suggests a link command. |
intow sync [--apply] |
Follows every tracked folder that moved. Without --apply it only shows what it would do. |
intow mv SRC DST |
Moves a folder and its Claude data together. Works across disks. |
intow link OLD NEW |
Attaches the data of a path that no longer exists to the folder NEW. Use it for moves made before intow was installed. With --force it also takes the data of a path that another folder uses now, all of it. |
intow scan |
Starts tracking every existing project folder. install runs this once. |
intow forget PATH… |
Stops tracking folders. |
intow log |
Lists past migrations. |
intow undo [FOLDER] |
Takes the last migration back, or the last one of FOLDER. What it moved returns under the old path. Sessions you have continued in the new place since, and settings Claude has changed there, stay where they are. The folder is no longer tracked afterwards. Run it again to take back the migration before that. |
intow shell-init [SHELL] |
Prints the claude shell function described under Install (zsh, bash, fish, powershell). |
intow install / uninstall [--purge] |
Adds or removes the hook in ~/.claude/settings.json. --purge also deletes intow's data. |
-n (--dry-run) works with mv, link and undo.
- Before changing
~/.claude.json,settings.jsonorinstalled_plugins.json, intow copies them to~/.claude/intow/backups/and keeps the last 20 copies. - Claude Code rewrites
~/.claude.jsonwhile it runs. intow edits it under the lock Claude itself uses (~/.claude.json.lock), re-reads the file right before replacing it and starts over if it changed. - Files that are symlinks stay symlinks. If
settings.json,history.jsonlor~/.claude.jsonpoint into a dotfiles folder (stow, chezmoi, home-manager), intow updates the file they point at. - Each migration is logged to
~/.claude/intow/log.jsonl, and every step of it is recorded in~/.claude/intow/journal/(the last 50).intow undoreverses exactly those steps. - Two names that lead to one directory, as on a case-insensitive volume, are never merged into each other.
- intow never deletes a session file. If a file name clashes, it leaves both files in place and reports the clash.
- The text of past messages is not changed. Absolute paths inside old messages and tool calls stay as they were.
- Release assets carry build provenance:
gh attestation verify intow_<version>_<os>_<arch>.tar.gz --repo p10node/intow.
| Follows moves automatically | mv, link |
|
|---|---|---|
| macOS | yes (exact, via /.vol) |
yes |
| Linux | yes, when the filesystem records birth times (ext4, btrfs, xfs) and the folder moved within a few levels of its old place | yes |
| Windows | yes, on NTFS and ReFS (file IDs); not on FAT or exFAT | yes, within a drive |
- Moves made before intow was installed. intow only knows a folder's identity after it has seen the folder once.
statuslists earlier moves as orphans and suggests alinkcommand. - Copies. Copying to another disk or cloning a repository afresh creates a new folder with a new identity. Use
intow mvfor the move, orlinkafterwards. claude --continueandclaude --resumeright after a move. Claude Code looks for the session before it runs hooks, so the hook comes too late for these two. Install the shell function (see Install), or runintow sync --applyonce.- Editors. The Claude Code extension for VS Code starts Claude, and with it the hook, when you open its panel or its Session Manager. By then the Session Manager has read its list and the panel has checked trust. After a rename the Session Manager says "No sessions yet" until you reload the window, and the panel can ask you to trust the folder again. The VS Code extension from this repository avoids both (see Install). The history popup in the panel reads the list each time it opens and needs nothing.
- Windows is new. Its tests pass under Wine and on a Windows runner in CI, but it has not been used with Claude Code on many real machines. A folder that programs spell in two ways (
C:\in a terminal,c:\from an editor) keeps one history per spelling, as Claude Code itself does; intow moves both. A rename that only changes case is not followed there, and neither is a move to another drive: useintow link. - Linux, hidden folders. The search skips hidden and dependency folders (
.cache,node_modules), except the ones the project lived in. - State intow cannot reach. What an editor stores per workspace (open panels, session groups), and absolute paths written inside the project itself, for example in
.claude/settings.local.json.
go test ./...
scripts/e2e.sh # against a real, logged-in Claude Code; uses three small Haiku requests
scripts/wine-test.sh # the test suite of the Windows build, under Wine in a container
(cd vscode && node --test) # the VS Code extension
vscode/e2e/docker.sh # the VS Code extension inside a real VS Code, in a containerTo release, tag a commit vX.Y.Z and push the tag. CI then:
- tests the code, builds the binaries with GoReleaser and publishes the release;
- attests the build provenance of every asset;
- commits the release's checksums to
plugin/checksums.txttogether with the new version inplugin/.claude-plugin/plugin.json(scripts/pin-plugin.sh), so plugin users only move to a version whose binaries exist and are pinned; - updates
p10node/homebrew-tap, if theHOMEBREW_TAP_TOKENsecret is set.
Step 3 pushes to main, so the workflow's token must be allowed to.
intow is not affiliated with Anthropic. MIT licensed.