claude-code - 💡(How to fix) Fix settings.local.json: 'Yes, allow' permission prompt writes malformed Read(//abs/path) with double leading slash [2 comments, 3 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#52835Fetched 2026-04-25 06:19:38
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

When a user clicks "Yes, allow" on a permission prompt for a Read(...) on an absolute path, Claude Code writes the entry to .claude/settings.local.json with a leading double slash (Read(//home/acs/...)) instead of a single slash. The malformed matcher never fires on subsequent sessions, so the same prompt recurs indefinitely — clicking "Yes, allow" again only appends another broken entry.

Root Cause

None of these match any real read because the actual paths canonicalise to /home/acs/....

Fix Action

Fix / Workaround

  • Users who rely on symlinked skills/agents (e.g. skills installed by editing a file under one path but exposed via ~/.claude/skills/ symlink) hit the permission prompt on every session, forever.
  • Clicking "Yes, allow" appears to work at the moment but silently fails to persist.
  • The workaround — hand-editing settings.json to add a correctly-formed Read(/path/**) — is fiddly and not discoverable.

Workaround for affected users

Code Example

{
  "permissions": {
    "allow": [
      "Read(//home/user/some/path/**)"
    ]
  }
}

---

Read(//home/acs/.claude/agents/adt/**)
Read(//home/acs/.claude/commands/adt/**)
Read(//home/acs/.claude/commands/**)
RAW_BUFFERClick to expand / collapse

Summary

When a user clicks "Yes, allow" on a permission prompt for a Read(...) on an absolute path, Claude Code writes the entry to .claude/settings.local.json with a leading double slash (Read(//home/acs/...)) instead of a single slash. The malformed matcher never fires on subsequent sessions, so the same prompt recurs indefinitely — clicking "Yes, allow" again only appends another broken entry.

Reproduction

  1. In any project, trigger a Claude Code Read operation on an absolute-path target (e.g. reading a symlinked skill file whose realpath starts with /home/...).
  2. The permission prompt appears. Click "Yes, allow reading from X during this session" or similar persistent-allow option.
  3. Inspect .claude/settings.local.json.

Expected: Read(/home/user/some/path/**)

Actual:

{
  "permissions": {
    "allow": [
      "Read(//home/user/some/path/**)"
    ]
  }
}

The leading // makes the matcher inert — the permission checker canonicalises requested paths with a single leading /, so //home/... never matches /home/.... Every new session re-prompts for the same Read, and clicking "Yes, allow" adds yet another broken entry.

Field-observed example

.claude/settings.local.json in one affected project accumulated three broken entries from repeated prompts:

Read(//home/acs/.claude/agents/adt/**)
Read(//home/acs/.claude/commands/adt/**)
Read(//home/acs/.claude/commands/**)

None of these match any real read because the actual paths canonicalise to /home/acs/....

Environment

  • Claude Code: 2.1.119
  • OS: Linux (Ubuntu 22.04, kernel 5.15)
  • Shell: bash
  • Config files: ~/.claude/settings.json (user-level, hand-written) + <project>/.claude/settings.local.json (auto-written by prompts)

Impact

  • Users who rely on symlinked skills/agents (e.g. skills installed by editing a file under one path but exposed via ~/.claude/skills/ symlink) hit the permission prompt on every session, forever.
  • Clicking "Yes, allow" appears to work at the moment but silently fails to persist.
  • The workaround — hand-editing settings.json to add a correctly-formed Read(/path/**) — is fiddly and not discoverable.

Likely fix location

The code path that translates the "Yes, allow" prompt's chosen path into the settings.local.json matcher string is prefixing the canonical path with an extra /. Stripping one leading slash before wrapping in Read(...) should resolve the issue.

Workaround for affected users

Manually edit settings.local.json and strip the leading / from any Read(//...) entries, OR preemptively add a correct Read(/...) rule to ~/.claude/settings.json. The adt tool at github.com/AntonioCS/agent-dev-tools (ticket wTmQcH7F) now does this automatically during install to work around the issue for users of that project.

extent analysis

TL;DR

The issue can be fixed by modifying the code to remove the extra leading slash when writing the Read permission to .claude/settings.local.json.

Guidance

  • Identify the code path that translates the "Yes, allow" prompt's chosen path into the settings.local.json matcher string and modify it to strip the extra leading slash.
  • Verify the fix by triggering a Read operation on an absolute-path target and checking that the resulting entry in .claude/settings.local.json has a single leading slash.
  • As a temporary workaround, manually edit settings.local.json to remove the extra leading slash from any Read(//...) entries.
  • Consider using the adt tool from github.com/AntonioCS/agent-dev-tools, which automatically works around the issue during install.

Example

No code snippet is provided as the issue does not include the relevant code, but the fix would involve modifying the line that writes the Read permission to .claude/settings.local.json to remove the extra leading slash.

Notes

The issue is specific to Claude Code version 2.1.119 and may not affect other versions. The workaround using the adt tool is specific to users of that project.

Recommendation

Apply the workaround by manually editing settings.local.json or using the adt tool, as the root cause is identified and a code fix is likely necessary to fully resolve the issue.

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 settings.local.json: 'Yes, allow' permission prompt writes malformed Read(//abs/path) with double leading slash [2 comments, 3 participants]