Regression in 2.1.168: `claude --bg` sessions don't load project-scope-installed plugins (user-scope loads fine)

Open 💬 0 comments Opened Jun 7, 2026 by neilinger

Environment

  • Claude Code 2.1.168 (regression; 2.1.167 behaves correctly)
  • macOS (darwin 25.6.0)
  • CLAUDE_CONFIG_DIR pointed at a non-default config dir (unclear if required for repro)

Summary

Since 2.1.168, sessions launched with claude --bg no longer load plugins installed at project scope. Plugins installed at user scope still load. Interactive sessions and claude -p (print mode) load both scopes correctly — only --bg daemon sessions are affected.

Repro

  1. In a project, install a marketplace plugin at project scope: claude plugin install <plugin>@<marketplace> --scope project (and/or enable via enabledPlugins in .claude/settings.json).
  2. From the project dir run print mode: claude -p "List ALL skills available to you via the Skill tool, one per line." → plugin's skills are listed. ✅
  3. Same prompt via bg: claude --bg --permission-mode bypassPermissions "...", then read output.result from $CLAUDE_CONFIG_DIR/jobs/<id>/state.json → plugin's skills are absent. ❌ User-scope-installed plugins from the same marketplace ARE listed.
  4. Reinstall the same plugin with --scope user → bg session sees it. ✅

Evidence of version boundary

Same project, same day, daemon-supervised bg worker transcripts (sessionKind: "bg"):

  • 2.1.167 worker (11:00Z): successfully invoked a project-scope plugin skill.
  • 2.1.168 workers (12:24Z, after auto-update): project-scope plugin skills missing from the skill list; sessions fell back to user-scope skills.

Impact

Orchestration flows that fan out work to claude --bg worker sessions (dispatcher/queue patterns) silently lose their project-scope toolkit. The models don't error — they improvise with whatever user-scope skills remain, bypassing the missing skill's safety rules. In our case a worker ran git checkout -b in a shared main checkout because the workflow skill that mandates worktree isolation never loaded.

Expected

--bg sessions resolve the same plugin set as interactive/-p sessions for the same cwd + config dir.

🤖 Generated with Claude Code

View original on GitHub ↗