claude-code - 💡(How to fix) Fix VSCode extension /resume doesn't respect CLAUDE_CONFIG_DIR from claudeCode.environmentVariables [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47825Fetched 2026-04-15 06:41:15
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5closed ×1commented ×1

Root Cause

  • Running in a cloud VM (code-server / VS Code remote)
  • CLAUDE_CONFIG_DIR is needed because the default ~/.claude/ doesn't persist between VM sessions

Code Example

"claudeCode.environmentVariables": [
     {
       "name": "CLAUDE_CONFIG_DIR",
       "value": "/home/user/data/.claude"
     }
   ]
RAW_BUFFERClick to expand / collapse

Bug Description

The VSCode extension passes CLAUDE_CONFIG_DIR to the CLI subprocess via the claudeCode.environmentVariables setting, but the extension's own session lookup (used by /resume) still reads from the default ~/.claude/ path. Sessions exist in the configured directory but aren't listed when using /resume.

Steps to Reproduce

  1. Set CLAUDE_CONFIG_DIR in VSCode settings:
    "claudeCode.environmentVariables": [
      {
        "name": "CLAUDE_CONFIG_DIR",
        "value": "/home/user/data/.claude"
      }
    ]
  2. Use Claude Code — sessions are correctly written to /home/user/data/.claude/projects/
  3. Run /resume — no sessions are listed

Evidence

  • Session .jsonl files exist in the configured directory (/home/user/data/.claude/projects/)
  • The extension writes its own IDE lock file to the default ~/.claude/ide/ rather than the configured directory, confirming it doesn't use CLAUDE_CONFIG_DIR for its own operations
  • No ide/ directory exists in the configured CLAUDE_CONFIG_DIR path

Expected Behavior

/resume should list sessions from the directory specified by CLAUDE_CONFIG_DIR in claudeCode.environmentVariables.

Environment

  • Running in a cloud VM (code-server / VS Code remote)
  • CLAUDE_CONFIG_DIR is needed because the default ~/.claude/ doesn't persist between VM sessions

extent analysis

TL;DR

The VSCode extension needs to use the CLAUDE_CONFIG_DIR environment variable for its own session lookup, not just for the CLI subprocess.

Guidance

  • Verify that the CLAUDE_CONFIG_DIR environment variable is correctly set in the VSCode settings and is being passed to the CLI subprocess.
  • Check if the extension's session lookup code can be modified to use the CLAUDE_CONFIG_DIR environment variable instead of the default ~/.claude/ path.
  • Consider creating an ide/ directory in the configured CLAUDE_CONFIG_DIR path to store the IDE lock file, to ensure consistency with the session files.
  • Review the extension's code to ensure that it correctly handles the CLAUDE_CONFIG_DIR environment variable for all its operations, not just the CLI subprocess.

Example

No code snippet is provided as the issue does not contain sufficient information about the extension's code.

Notes

The issue seems to be related to the extension's internal implementation and how it handles environment variables. The solution may require modifying the extension's code to correctly use the CLAUDE_CONFIG_DIR environment variable.

Recommendation

Apply a workaround by modifying the extension's code to use the CLAUDE_CONFIG_DIR environment variable for its own session lookup, as the default behavior is not meeting the expected requirements.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix VSCode extension /resume doesn't respect CLAUDE_CONFIG_DIR from claudeCode.environmentVariables [1 comments, 2 participants]