Skip to content

Bug: Claude Code installed_plugins.json overwritten with project-scoped entries when Claudian spawns CLI with vault as cwd #669

@LeonYe612

Description

@LeonYe612

When Claudian spawns Claude Code with cwd set to the Obsidian vault directory, Claude Code detects the vault as a project directory and writes plugin entries with scope: "project" to ~/.claude/plugins/installed_plugins.json, overwriting the user's global user-level plugin configuration. This happens every time the user has a conversation in Claudian.

Steps to Reproduce:

1.Install Claude Code CLI and configure several plugins at user scope (scope: "user")
2.Verify ~/.claude/plugins/installed_plugins.json — all entries show "scope": "user"
3.Install Claudian (any version including 2.0.11)
4.set Claudian--safety--Load user claude setting [disable]
5.set Claudian-- claude code plugins [all disable]
6.Open Obsidian and have a conversation in Claudian
7.Check ~/.claude/plugins/installed_plugins.json again — entries are now "scope": "project" with "projectPath" bound to the vault directory

Root Cause:

In the bundled main.js, Claudian spawns Claude Code with:

// ~Line 25244
const options = { cwd: vaultPath, ... };

// ~Line 57552
const options = { cwd: vaultPath, ... };

Claude Code treats vaultPath as the project directory and writes project-scoped plugin records to the global installed_plugins.json, overwriting user-level entries.

Suggested Fix:
Replace cwd: vaultPath with cwd: os.homedir() in both locations. The os module is already imported in the bundled file.

diff

  • cwd: vaultPath,
  • cwd: os.homedir(),

Environment:
macOS (iCloud-synced vault)
Claudian 2.0.11
Vault: ~/Library/Mobile Documents/Documents/Obsidian Vault iCloud/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions