claude-code - 💡(How to fix) Fix Log wording: 'Broken symlink or missing file' is misleading when the file is simply absent

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…

In Claude Code 2.1.141, on every cold start, the CLI emits a debug-level log line for each project directory that lacks a .claude/settings.json:

[DEBUG] Broken symlink or missing file encountered for settings.json at path:
  c:\Users\noahr\code repos\<repo>\.claude\settings.json

In a workspace with many additional working directories, this fires 20–40 times per startup. The wording suggests filesystem corruption (broken symlink) when the underlying reality is simply that the optional file doesn't exist.

Root Cause

In Claude Code 2.1.141, on every cold start, the CLI emits a debug-level log line for each project directory that lacks a .claude/settings.json:

[DEBUG] Broken symlink or missing file encountered for settings.json at path:
  c:\Users\noahr\code repos\<repo>\.claude\settings.json

In a workspace with many additional working directories, this fires 20–40 times per startup. The wording suggests filesystem corruption (broken symlink) when the underlying reality is simply that the optional file doesn't exist.

Code Example

[DEBUG] Broken symlink or missing file encountered for settings.json at path:
  c:\Users\noahr\code repos\<repo>\.claude\settings.json
RAW_BUFFERClick to expand / collapse

Summary

In Claude Code 2.1.141, on every cold start, the CLI emits a debug-level log line for each project directory that lacks a .claude/settings.json:

[DEBUG] Broken symlink or missing file encountered for settings.json at path:
  c:\Users\noahr\code repos\<repo>\.claude\settings.json

In a workspace with many additional working directories, this fires 20–40 times per startup. The wording suggests filesystem corruption (broken symlink) when the underlying reality is simply that the optional file doesn't exist.

Repro

  1. Open Claude Code in a workspace where multiple project paths are added via --add-dir or cliArg-permissions
  2. Most of those paths don't have a .claude/settings.json (which is the normal state — the file is optional)
  3. Run with --debug
  4. Observe ~one "Broken symlink or missing file" line per project directory

Why it matters

  • Operator confusion. "Broken symlink" reads as filesystem corruption. The first time I saw the cluster I assumed I had bad symlinks somewhere and went looking. They don't exist — the files just aren't there.
  • Volume. In a workspace with 24 cliArg working directories (each searched for .claude/settings.json + .claude/settings.local.json), this fires 30–48 times per launch.

Suggested change

Differentiate the two underlying conditions:

ConditionSuggested wording
ELOOP / stat reports broken symlinkBroken symlink encountered for settings.json at path: ...
ENOENT (file simply doesn't exist)Optional settings.json not present at path: ... (or drop the log entirely for ENOENT since it's the normal case)

Alternatively: silence the ENOENT case entirely at DEBUG level for project directories that didn't volunteer a .claude/ folder — that's the common case and isn't diagnostic.

Environment

  • Claude Code 2.1.141 (VS Code extension on Windows 11)
  • Multi-repo workspace with 24 working directories added via cliArg permissions

Diagnosis source: workspace-ops PR #6302-errors-and-warnings.md (third-party operator notes).

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 Log wording: 'Broken symlink or missing file' is misleading when the file is simply absent