entireio / entireio/cli

session resume writes to ~/.claude instead of $CLAUDE_CONFIG_DIR

Open
#2,367 0 comments 1 reaction 1 assignee View on GitHub

@gtrrz-victor is already working on this.

Since Sep 11, 2026.

Dominant language
Go
Stars
5.1k
Forks
475
Avg merge
1d 11h
Merged PRs (30d)
178

Description

What happened?

entire session resume restores the transcript to a hardcoded ~/.claude/projects/... and ignores the CLAUDE_CONFIG_DIR environment variable that Claude Code itself honours.

On any setup that relocates the Claude config directory, the restored transcript lands somewhere the agent will not look — so claude -r <id> cannot find it. Worse, in my case it lands on storage the user has deliberately moved away from.

entire session resume --help exposes no flag to redirect the destination. The string CLAUDE_CONFIG_DIR does appear in the binary, so it seems to be understood elsewhere in the codebase, just not on the restore path.

I hit this while evaluating Entire for moving agent sessions between two machines. Everything else in that flow worked well — see "Additional context" below, because I think the surrounding design is right and this is a one-line-ish gap in it.

Steps to reproduce

Two clones of the same repo, each with its own CLAUDE_CONFIG_DIR, and a bare repo standing in for the remote.

machineA — capture and push a session:

export CLAUDE_CONFIG_DIR=/tmp/configA
entire enable --telemetry=false --agent claude-code --yes
claude -p --permission-mode acceptEdits "Edit app.py so it prints 'hello world'. Then reply DONE."
git commit -am "feat: print hello world"     # checkpoint created, Entire-Checkpoint trailer added
git push origin main
# [entire] Pushing 1 checkpoint ref(s) to origin... done

machineB — a second clone, different config dir:

export CLAUDE_CONFIG_DIR=/tmp/configB
git fetch origin '+refs/entire/*:refs/entire/*'
entire session resume main

Expected — the transcript is written under $CLAUDE_CONFIG_DIR:

/tmp/configB/projects/<encoded-cwd>/d3d706a8-9061-48df-bddc-f5080ae5c1d5.jsonl

Actual — it is written under the hardcoded default, and $CLAUDE_CONFIG_DIR stays empty:

$ entire session resume main
Writing transcript to: /home/vscode/.claude/projects/<encoded-cwd>/d3d706a8-9061-48df-bddc-f5080ae5c1d5.jsonl
✓ Restored session d3d706a8-9061-48df-bddc-f5080ae5c1d5.

$ find "$CLAUDE_CONFIG_DIR" -name '*.jsonl' | wc -l
0
Entire CLI version

Entire CLI 0.10.6 (Go 1.26.6, linux/amd64)

OS and architecture

Linux 6.18.33.2-microsoft-standard-WSL2 x86_64 (Ubuntu, inside a dev container on WSL2)

Agent

Claude Code 2.1.220

Terminal

VS Code integrated terminal (bash)

Suggested fix

On the restore path, resolve the config root as os.Getenv("CLAUDE_CONFIG_DIR") falling back to ~/.claude, matching Claude Code's own precedence. A --config-dir flag on session resume would also work, though honouring the environment variable is the smaller surprise.

Happy to test a patch against the reproduction above.

Additional context

Why this matters beyond preference. We point CLAUDE_CONFIG_DIR at a mounted volume specifically so transcripts survive a container rebuild. A restore that writes to the container-local default gets destroyed by the next rebuild — and because the restore reports success, the loss is silent until someone goes looking for the conversation.

The other case is several isolated config directories on one machine: restoring into the shared default merges state that was deliberately kept apart.

The rest of the flow is genuinely good, which is why this stands out. Rewriting the project directory for the destination's own path is exactly the right call — it is what let a pinned, older Claude Code (2.1.220, which cannot do cross-directory --resume) resolve a session that arrived from a different checkout. I moved a session between two clones through a git ref and resumed it with full context intact; asked what it had edited, it described the change correctly and even noticed the file belonged to the other checkout. This one path is the only thing stopping that from working with a relocated config directory.

Also worth noting: a plain git clone does not fetch refs/entire/* (default refspec is refs/heads/*), so the explicit refspec above is needed. That may be obvious to you, but it was not to me from the README.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.