Skip to content

Commit c708012

Browse files
authored
fix(claude): add XDG state and cache paths for Claude Code 2.x (#20)
Claude Code 2.x uses XDG-style directories for state and cache: - ~/.local/state/claude/ for lock files - ~/.cache/claude/ for staging Without these paths, OAuth token refresh fails because the lock file write to ~/.local/state/claude/locks/ is denied.
1 parent 55b57fc commit c708012

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

profiles/claude.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ allow_read = [
88
"~/.claude.json",
99
"~/.claude.lock",
1010
"~/.local/share/claude",
11+
"~/.local/state/claude", # XDG state dir for locks
12+
"~/.cache/claude", # XDG cache dir for staging
1113
"~/.local/bin/claude",
1214
"~/.CFUserTextEncoding",
1315
"/private/tmp/claude*", # claude-UID directories (e.g. claude-501)
@@ -18,6 +20,8 @@ allow_write = [
1820
"~/.claude.json",
1921
"~/.claude.lock",
2022
"~/.local/share/claude",
23+
"~/.local/state/claude", # XDG state dir for locks
24+
"~/.cache/claude", # XDG cache dir for staging
2125
"~/Library/Caches/claude-cli-nodejs/",
2226
"~/Library/Keychains/login.keychain-db", # OAuth token refresh
2327
"/private/tmp/claude*", # claude-UID directories (e.g. claude-501)

0 commit comments

Comments
 (0)