[BUG] cannot resume sessions when using CLAUDE_CONFIG_DIR

Resolved 💬 3 comments Opened Jan 2, 2026 by tqwhite Closed Feb 16, 2026

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

  1. Set a custom config directory:

``bash
export CLAUDE_CONFIG_DIR=/path/to/custom/config
``

  1. Start a Claude Code session:

``bash
cd /some/project/directory
claude
``

  1. Work in the session, then exit. Note the session ID (visible in /resume picker or in the session file).
  1. Verify the session was saved to the custom location:

``bash
ls $CLAUDE_CONFIG_DIR/projects/-path-encoded-directory/
# Shows: SESSION_ID.jsonl
``

  1. Attempt to resume:

``bash
export CLAUDE_CONFIG_DIR=/path/to/custom/config
claude --resume SESSION_ID
``

  1. 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:

  1. Sessions save to the correct custom location
  2. The /resume picker (inside an active session) can find sessions in the custom location
  3. But claude --resume from 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_DIR cannot resume sessions from CLI
  • Workarounds (symlinks) break session isolation between different configurations
  • The command provided by /resume picker 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

  1. Set a custom config directory:

``bash
export CLAUDE_CONFIG_DIR=/path/to/custom/config
``

  1. Start a Claude Code session:

``bash
cd /some/project/directory
claude
``

  1. Work in the session, then exit. Note the session ID (visible in /resume picker or in the session file).
  1. Verify the session was saved to the custom location:

``bash
ls $CLAUDE_CONFIG_DIR/projects/-path-encoded-directory/
# Shows: SESSION_ID.jsonl
``

  1. Attempt to resume:

``bash
export CLAUDE_CONFIG_DIR=/path/to/custom/config
claude --resume SESSION_ID
``

  1. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗