[BUG] macOS: startup hangs forever (uninterruptible openat) when known_marketplaces.json installLocation points under /home (autofs)

Status Open
Reported on v2.1.288
Maintainer reply None cached
Activity 0 comments · opened Oct 7, 2026

Preflight Checklist

  • [x] I have searched existing issues. Related, but none open for this path: #77758 (same uninterruptible openat on autofs /home, but for .oauth_token; closed as stale), #25693 (hang on a missing local marketplace installLocation; closed), #97824 (Claude Code probing /home autofs).
  • [x] This is a single bug report

What's Wrong?

On macOS, claude -p hangs forever at startup when ~/.claude/plugins/known_marketplaces.json has an installLocation under /home/.... That happens, for example, when ~/.claude was copied from a Linux machine:

"claude-plugins-official": {
  "installLocation": "/home/<user>/.claude/plugins/marketplaces/claude-plugins-official",
  ...
}

On macOS /home is a symlink to /System/Volumes/Data/home, which is the autofs auto_home map. Opening a path under it for a user that doesn't exist blocks indefinitely in the kernel. Claude Code makes this open on its startup path, with no timeout and before auth, so the process:

  • never produces any output (in stream-json mode, not even the init event)
  • never writes a session transcript
  • uses 0% CPU and has no TCP connections
  • ignores SIGINT and SIGTERM (the thread is inside openat$NOCANCEL)
  • can only be stopped with kill -9

~/.claude/debug/latest was also a stale symlink to /home/<user>/.claude/debug/... on this machine, which is a second instance of the same trap.

Evidence

sample <pid> 1: the main thread spends 100% of samples in openat$NOCANCEL, under 9 identical native frames then JIT frames, which matches a 9-component path walk of /System/Volumes/Data/home/<user>/.claude/plugins/marketplaces/claude-plugins-official.

lsof -p <pid>: no TCP sockets, only stdio. Network to api.anthropic.com is fine (curl returned 404 in 0.18s).

Two independent claude -p processes on the same machine hung identically. One had been stuck for over 6 hours.

What Should Happen?

  • Startup must not block on reading plugin/marketplace locations (or any other optional config path). Do that I/O off the critical path or with a timeout, and on failure skip the marketplace with a warning.
  • Ideally, flag installLocation/symlink targets that don't exist on this machine (e.g. /home/... on macOS) as invalid, without opening them.

Steps to Reproduce

  1. On macOS, put a marketplace entry in ~/.claude/plugins/known_marketplaces.json whose installLocation is /home/<nonexistent-user>/.claude/plugins/marketplaces/foo.
  2. Run claude -p "hi" (or the stream-json headless mode an orchestrator uses).
  3. It hangs with no output. Ctrl+C / SIGTERM do nothing, and only kill -9 stops it.

How quickly auto_home gives up depends on the machine's Directory Service setup. On the affected machine it never returned.

Claude Model

Not applicable (hang happens before any API call)

Is this a regression?

I don't know

Claude Code Version

2.1.288

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Non-interactive (claude -p --input-format stream-json --output-format stream-json, launched by an agent orchestrator)

Additional Information

The machine also had no valid credentials. Without the hang it would have failed fast with "OAuth session expired". So in practice this bug turns a clear auth error into a silent, unkillable hang.

View original on GitHub ↗