Completed
on 9 Jan 2026, 10:24 am

Output

CLAUDE_CONFIG_DIR Environment Variable

Yes! Claude Code supports the CLAUDE_CONFIG_DIR environment variable to specify a custom config directory.

Usage

# Set before running claude
export CLAUDE_CONFIG_DIR="/path/to/.claude-account1"
claude

# Or inline
CLAUDE_CONFIG_DIR="/path/to/.claude-max5x" claude -p "hello"

Konsole Could Use This

Instead of symlink switching, konsole could spawn Claude with:

// Current approach (symlink)
~/.claude  ~/.claude-max20x

// Alternative (env var per-process)
Deno.Command("claude", {
  env: { CLAUDE_CONFIG_DIR: "/home/user/.claude-max20x" }
})

Advantages of Env Var Approach

  • Run different accounts in parallel (no symlink race)
  • No need to kill hot pool on account switch
  • Per-session account selection

Known Issues

  • Still creates local .claude/ dirs in workspaces
  • /ide command doesn't respect it (looks in default location)
  • Undocumented in official docs

Sources: GitHub Issue #3833, #4739

Quick Actions

Original Request

No layout configured

Details

Type General
Status Completed
Scope vibetools
Tags konsoleclaude-codeconfiguration
Created 9 Jan 2026, 10:24 am
Updated 9 Jan 2026, 10:24 am
Timing
⏱️ 55.7s
0 tools
TTFE 0% Thinking 100% Tools 0%
Created By claude

Raw Data

{
  "id": "2c7442e9-1997-4b28-a320-812576fdb068",
  "type": "general",
  "status": "completed",
  "title": "CLAUDE_CONFIG_DIR Environment Variable",
  "description": "Claude Code supports CLAUDE_CONFIG_DIR to override config directory",
  "context": {
    "output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">CLAUDE_CONFIG_DIR Environment Variable</h2>\n\n<p style=\"line-height:1.6;\">Yes! Claude Code supports the <code style=\"background:#2d2d2d;padding:2px 6px;border-radius:4px;color:#98c379;\">CLAUDE_CONFIG_DIR</code> environment variable to specify a custom config directory.</p>\n\n<h3 style=\"color:#61afef;margin:16px 0 8px 0;\">Usage</h3>\n<pre style=\"background:#2d2d2d;padding:12px;border-radius:6px;line-height:1.6;\">\n<span style=\"color:#7f848e;\"># Set before running claude</span>\n<span style=\"color:#c678dd;\">export</span> <span style=\"color:#e5c07b;\">CLAUDE_CONFIG_DIR</span>=<span style=\"color:#98c379;\">\"/path/to/.claude-account1\"</span>\n<span style=\"color:#56b6c2;\">claude</span>\n\n<span style=\"color:#7f848e;\"># Or inline</span>\n<span style=\"color:#e5c07b;\">CLAUDE_CONFIG_DIR</span>=<span style=\"color:#98c379;\">\"/path/to/.claude-max5x\"</span> <span style=\"color:#56b6c2;\">claude</span> -p <span style=\"color:#98c379;\">\"hello\"</span>\n</pre>\n\n<h3 style=\"color:#61afef;margin:16px 0 8px 0;\">Konsole Could Use This</h3>\n<p style=\"line-height:1.6;\">Instead of symlink switching, konsole could spawn Claude with:</p>\n<pre style=\"background:#2d2d2d;padding:12px;border-radius:6px;line-height:1.6;\">\n<span style=\"color:#7f848e;\">// Current approach (symlink)</span>\n~/.claude <span style=\"color:#c678dd;\">→</span> ~/.claude-max20x\n\n<span style=\"color:#7f848e;\">// Alternative (env var per-process)</span>\nDeno.Command(<span style=\"color:#98c379;\">\"claude\"</span>, {\n  env: { <span style=\"color:#e5c07b;\">CLAUDE_CONFIG_DIR</span>: <span style=\"color:#98c379;\">\"/home/user/.claude-max20x\"</span> }\n})\n</pre>\n\n<h3 style=\"color:#61afef;margin:16px 0 8px 0;\">Advantages of Env Var Approach</h3>\n<ul style=\"margin:0;padding-left:20px;line-height:1.8;\">\n<li><span style=\"color:#98c379;\">✓</span> Run different accounts in parallel (no symlink race)</li>\n<li><span style=\"color:#98c379;\">✓</span> No need to kill hot pool on account switch</li>\n<li><span style=\"color:#98c379;\">✓</span> Per-session account selection</li>\n</ul>\n\n<h3 style=\"color:#f97316;margin:16px 0 8px 0;\">Known Issues</h3>\n<ul style=\"margin:0;padding-left:20px;line-height:1.8;\">\n<li>Still creates local <code style=\"background:#2d2d2d;padding:2px 6px;border-radius:4px;\">.claude/</code> dirs in workspaces</li>\n<li><code style=\"background:#2d2d2d;padding:2px 6px;border-radius:4px;\">/ide</code> command doesn't respect it (looks in default location)</li>\n<li>Undocumented in official docs</li>\n</ul>\n\n<p style=\"margin:16px 0 0 0;color:#7f848e;\">Sources: <a href=\"https://github.com/anthropics/claude-code/issues/3833\" style=\"color:#61afef;\">GitHub Issue #3833</a>, <a href=\"https://github.com/anthropics/claude-code/issues/4739\" style=\"color:#61afef;\">#4739</a></p>\n</div>",
    "requestedAt": "2026-01-09T00:10:00.000Z",
    "requestId": "b2142bca-6f9d-4556-8b6f-d932c8346c51",
    "choices": [
      {
        "label": "Implement in konsole",
        "value": "Update konsole to use CLAUDE_CONFIG_DIR instead of symlink switching for account management",
        "primary": true
      },
      {
        "label": "Keep current approach",
        "value": "The symlink approach works fine, no changes needed"
      }
    ],
    "turnTiming": {
      "totalMs": 55679,
      "ttfeMs": 51,
      "thinkingMs": 55628,
      "toolExecutionMs": 0,
      "toolCallCount": 0,
      "thinkingPct": 100,
      "toolsPct": 0,
      "ttfePct": 0
    }
  },
  "createdBy": "claude",
  "createdAt": "2026-01-09T00:24:37.527Z",
  "updatedAt": "2026-01-09T00:24:42.294Z",
  "requestId": "b2142bca-6f9d-4556-8b6f-d932c8346c51",
  "scope": "vibetools",
  "tags": [
    "konsole",
    "claude-code",
    "configuration"
  ],
  "targetUser": "claude"
}
DashboardReportsKontasksFlowsDecisionsSessionsTelemetryLogs + Go