[BUG] cannot resume sessions when using CLAUDE_CONFIG_DIR
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug Report: --resume ignores CLAUDE_CONFIG_DIR for session lookup
Summary
When using a custom CLAUDE_CONFIG_DIR, sessions are correctly saved to $CLAUDE_CONFIG_DIR/projects/..., but claude --resume SESSION_ID ignores this variable and only searches ~/.claude/projects/. This creates an asymmetry where sessions can be created but not resumed.
Environment
- Claude Code version: 2.0.76
- OS: macOS (Darwin 24.5.0)
- Shell: bash
Steps to Reproduce
- Set a custom config directory:
``bash``
export CLAUDE_CONFIG_DIR=/path/to/custom/config
- Start a Claude Code session:
``bash``
cd /some/project/directory
claude
- Work in the session, then exit. Note the session ID (visible in
/resumepicker or in the session file).
- Verify the session was saved to the custom location:
``bash``
ls $CLAUDE_CONFIG_DIR/projects/-path-encoded-directory/
# Shows: SESSION_ID.jsonl
- Attempt to resume:
``bash``
export CLAUDE_CONFIG_DIR=/path/to/custom/config
claude --resume SESSION_ID
- Result:
No conversation found with session ID: SESSION_ID
Expected Behavior
claude --resume should search for sessions in $CLAUDE_CONFIG_DIR/projects/ when that environment variable is set.
Actual Behavior
claude --resume only searches ~/.claude/projects/, ignoring the CLAUDE_CONFIG_DIR environment variable.
Workaround
Creating a symlink makes the session findable:
ln -s "$CLAUDE_CONFIG_DIR/projects/-encoded-path" ~/.claude/projects/"-encoded-path"
claude --resume SESSION_ID # Now works
Additional Context
This asymmetry is particularly problematic for users who maintain multiple Claude configurations (e.g., different personas or project contexts with separate config directories). The current behavior means:
- Sessions save to the correct custom location
- The
/resumepicker (inside an active session) can find sessions in the custom location - But
claude --resumefrom CLI cannot find them
This suggests the session picker respects CLAUDE_CONFIG_DIR but the --resume flag's path resolution does not.
Impact
- Users with custom
CLAUDE_CONFIG_DIRcannot resume sessions from CLI - Workarounds (symlinks) break session isolation between different configurations
- The command provided by
/resumepicker fails when run outside an active session
---
Reported: 2026-01-02
What Should Happen?
Expected Behavior
claude --resume should search for sessions in $CLAUDE_CONFIG_DIR/projects/ when that environment variable is set.
Actual Behavior
claude --resume only searches ~/.claude/projects/, ignoring the CLAUDE_CONFIG_DIR environment variable.
Workaround
Creating a symlink makes the session findable:
ln -s "$CLAUDE_CONFIG_DIR/projects/-encoded-path" ~/.claude/projects/"-encoded-path"
claude --resume SESSION_ID # Now works
Error Messages/Logs
doesn't find the session
Steps to Reproduce
Steps to Reproduce
- Set a custom config directory:
``bash``
export CLAUDE_CONFIG_DIR=/path/to/custom/config
- Start a Claude Code session:
``bash``
cd /some/project/directory
claude
- Work in the session, then exit. Note the session ID (visible in
/resumepicker or in the session file).
- Verify the session was saved to the custom location:
``bash``
ls $CLAUDE_CONFIG_DIR/projects/-path-encoded-directory/
# Shows: SESSION_ID.jsonl
- Attempt to resume:
``bash``
export CLAUDE_CONFIG_DIR=/path/to/custom/config
claude --resume SESSION_ID
- Result:
No conversation found with session ID: SESSION_ID
Expected Behavior
claude --resume should search for sessions in $CLAUDE_CONFIG_DIR/projects/ when that environment variable is set.
Actual Behavior
claude --resume only searches ~/.claude/projects/, ignoring the CLAUDE_CONFIG_DIR environment variable.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗