MagicTools
Claude GuidesAugust 7, 20269 views2 min read

claude install Creates a Broken %h Symlink? Clean Debian Test Comes Out Fine (Not Reproduced)

What this article is: a not-reproduced field report. We could not reproduce the reported problem — which does not mean the report is wrong, only that it does not show up in the environment and with the method below. Every command and its raw output is included; cross-check us.

What the original report says

GitHub issue #83484 (Fedora 44 + bash, Claude Code 2.1.220): after running the official one-line installer, ~/.local/bin/claude is a broken symlink —

$ curl -fsSL https://claude.ai/install.sh | bash
$ file ~/.local/bin/claude
/home/user/.local/bin/claude: broken symbolic link to %h/.local/share/claude/versions/2.1.220

The %h in the target is an unexpanded placeholder (the systemd-style home-directory specifier) that should have become /home/user. The reporter traced the problem not to the shell installer but to the binary's internal install subcommand, and confirmed it is a regression ("this worked in a previous version"). The issue links a fix PR (#83738, unmerged at reporting time).

Our test: it comes out fine

Environment: a clean debian:bookworm-slim Docker container, root user, 2026-08-06, running the exact command from the report:

$ curl -fsSL https://claude.ai/install.sh | bash
$ ls -la /root/.local/bin/claude
lrwxrwxrwx 1 root root 42 Aug  6 10:23 /root/.local/bin/claude -> /root/.local/share/claude/versions/2.1.223
$ file /root/.local/bin/claude
/root/.local/bin/claude: symbolic link to /root/.local/share/claude/versions/2.1.223

Two key observations:

  1. The symlink is valid — the home directory in the target path expanded correctly to /root, with no literal %h anywhere
  2. install.sh currently ships 2.1.223, three releases past the reported 2.1.220 (2.1.221/222/223 released August 3/4/5)

Why it did not reproduce: three candidate explanations

Ordered by strength of evidence:

Explanation 1: fixed somewhere in 2.1.221–2.1.223 (most likely). The report was against 2.1.220, a fix PR exists, and install.sh now ships 2.1.223 — if the fix landed in any of those releases, fresh installs simply no longer hit it. We could not find release notes explicitly saying "fixed %h expansion", so this remains unconfirmed.

Explanation 2: distro-specific. The report is from Fedora 44; we tested Debian 12. %h is the home-directory specifier used in systemd unit files — if the binary's install subcommand reads a path template from systemd-related configuration on some systems, behavior could vary by distro. This is a mechanism guess; we have no Fedora environment to verify it.

Explanation 3: leftover state in the reporter's environment. The reporter said a previous version worked, so remnants of the older install may have participated in path generation. A clean container has no remnants — which might be exactly why we cannot trigger it. Equally unconfirmed.

Whatever the root cause, the repair is deterministic (the workaround the reporter verified in the issue):

# Point the broken link at the version directory that actually exists
ls ~/.local/share/claude/versions/        # see what versions you have
ln -sf ~/.local/share/claude/versions/<version> ~/.local/bin/claude
claude --version                          # verify

Or simpler: re-run the official install command — the 2.1.223 it currently ships came out clean in our test.

Scope and boundaries

  • This article proves only: a clean Debian 12 environment + the 2026-08-06 install.sh (shipping 2.1.223) does not exhibit the problem
  • It does not prove: that Fedora is fixed, that the 2.1.220 problem never existed, or that every environment is fine
  • If you can still reproduce it on another distro (especially Fedora with 2.1.221+), please add your environment details to issue #83484 — that would directly falsify explanation 1 and substantiate explanation 2

Related Articles

Claude Code Says No conversation found to continue — Your -p Sessions Are Being Filtered Out

You run a headless claude -p command, then type claude --continue to pick it up interactively — and get No conversation found to continue, even though the session file sits right there on disk. This is a regression introduced in v2.1.90: the --resume picker's 'hide -p/SDK sessions' filter was mistakenly applied to --continue, which should continue the latest session unconditionally. We reproduced it end to end on macOS + v2.1.220 (the GitHub issue reports Fedora, so both platforms confirm), and verified two workarounds: headless -p --continue has always worked, and prefixing CLAUDE_CODE_ENTRYPOINT=sdk-cli lets interactive --continue bypass the filter with full history loaded.

claude-codeheadless+4
claudeAug 6, 20263 min
14

Which Model Is Claude Code Actually Using? settings.json vs ANTHROPIC_MODEL vs --model, Tested

Multi-agent setups, CI, and batch scripts all rest on one assumption: the session actually runs on the model you configured. But the model can be set in four places — settings.json, the ANTHROPIC_MODEL environment variable, the --model flag, and /model in-session — and the docs never give you one table saying which wins. Meanwhile a GitHub issue reports settings.json silently ignored on Windows, with a full day of work run on the wrong model and discarded. Using modelUsage as hard evidence, we tested the chain layer by layer: --model > ANTHROPIC_MODEL > project settings.json > built-in default, with the [1m] suffix form working too — plus a verification method more trustworthy than any UI hint.

claude-codeclaude-code-lab+4
claudeAug 6, 20263 min
14

The Claude Code Hooks Stdin Trap: Python Heredocs Eat Your Hook JSON

The docs say hooks receive JSON via stdin — true. But parse it with a python heredoc (python3 - <<'EOF') and you hit a silent failure: the heredoc redirects python's stdin to the script itself, so json.load(sys.stdin) reads nothing. A best-practice hook then swallows the exception and exits 0 — no error anywhere, just a hook that 'somehow does not work'. The real debugging session, the two-line fix, and a lesson: silently fault-tolerant code is your enemy at debugging time.

claude-codehooks+5
claudeAug 6, 20263 min
25

I Put My Opus 5 Config on the Recommended Diet, Then Ran 18 A/B Trials: 21% Cheaper, and I Can't Prove It's Better

"Opus 5 verifies itself, so delete your fallback prompts" is advice you hear everywhere. I took it, then isolated both configs with CLAUDE_CONFIG_DIR and ran 18 headless trials on identical tasks. Output tokens dropped 21% and wall clock 20-29%, with zero counterexamples. But two of the rewritten rules never fired at all, and one result points the other way: the old config's most thorough run covered a strict superset of what the new one found. Why cheaper and better are separate questions.

prompt-engineeringclaude-code+4
claudeAug 5, 20266 min
39

Published by MagicTools