Skip to content

wmux modifies global claude settings without permission and/or warning #132

Closed

Description

@Modestas

Problem

wmux modifies global ~/.claude configuration without clearly asking first. If those changes are removed manually, they are added again on the next run.

Suggestions

  1. Move wmux browser and wmux markdown into optional Claude skills that users can install when needed.
  2. Make notification hooks opt-in:
    • Ask on first run before modifying any config.
    • Let users decline permanently.
    • Allow enabling them later from settings.
    • Support both global and per-project installation.

Activity

  1. arnonuem commented on Jul 30, 2026

    @arnonuem

    How can this be reproduced?

  2. Modestas commented on Jul 31, 2026

    @Modestas
    Author

    Global CLAUDE.md modified by wmux: C:\Users\<YOUR_USER>\.claude\CLAUDE.md

    https://github.com/amirlehmam/wmux/blob/master/src/main/claude-context.ts

    my quick-fix in fork:
    https://github.com/Modestas/wmux/commit/1785ad34a2ec4e4bcf50100045f6ab8c4b51cbe7

  3. amirlehmam commented on Jul 31, 2026

    @amirlehmam
    Owner

    You were right, and the fix is shipping in v0.40.0.

    What was actually wrong

    I want to be precise about this rather than just say "added a prompt", because the bug was structural, not an oversight in one function.

    ensureClaudeContext() and its three siblings were written to be idempotent — safe to run on every launch, converging on the same result no matter the starting state. That is a good property, and it is exactly the property that made your deletions futile. Idempotence and consent pull in opposite directions: one says "always reach the same end state", the other says "the user's decision is part of the state". The code implemented the first and had no representation for the second at all. There was nowhere for a "no" to live, so there was nothing for the next launch to read.

    Your fork's quick-fix went straight at that, and the shape you chose is the shape I built.

    Also worth stating plainly: it was four separate writes, not one, and the issue title undersells it. Per launch, wmux was touching ~/.claude/CLAUDE.md, ~/.claude/settings.json (twice — hooks and an MCP server entry, plus force-disabling the official chrome-devtools-mcp plugin), ~/.claude/plugins/, and — undocumented anywhere — ~/.config/opencode/AGENTS.md and ~/.config/opencode/plugin/. If you had only removed the Claude files you would still have been carrying two more.

    What shipped

    A decision stored in wmux's own settings file (%APPDATA%\wmux\settings.json), never in the files being written:

    unset     nothing written yet — ask
    granted   apply the features that are on
    declined  write nothing, and take back anything an earlier version wrote
    

    First launch asks, with a dialog that names the exact paths. "wmux would like to integrate with Claude Code" is not consent; enumerating the four files it will edit is. Three buttons: Enable / Not now / Never. "Not now" is genuinely not-now — the decision stays unset and you are asked again, rather than being quietly counted as a yes.

    Every ensure* gained an inverse. This is the half that answers "if those changes are removed manually, they are added again". Declining does not merely stop future writes, it removes the current ones — which matters most for you, since your install already has all of it. Removal is deliberately conservative:

    • your own hooks in PostToolUse/Stop/etc. survive; only entries matching wmux's marker go, and an array left empty is deleted rather than left as []
    • a chrome-devtools MCP entry you have since re-pointed somewhere else survives — only one aimed at wmux's own CDP port is removed
    • enabledPlugins is only cleared where the value is still the false wmux set; if you deliberately re-enabled the official plugin, that stands
    • a CLAUDE.md containing more than our block keeps everything else, with the surrounding blank lines collapsed so removal leaves no growing gap; a file that was only our block is deleted, because an empty CLAUDE.md you never asked for is still a file you never asked for
    • an opencode/plugin/wmux.js without our version marker is left alone — uninstalling our integration must not delete your file

    Settings → General → Agent integration has a master toggle plus four independent ones: agent instructions, status hooks, orchestrator plugin, browser panel for MCP. Each shows the paths it touches. Turning one off removes what it wrote, for the same reason as above — a toggle that only gates future writes would reproduce your complaint one level down.

    A corrupt or unparseable consent record falls back to asking, never to granting. A settings file that fails to parse must not become a silent yes on your behalf. There is a test for exactly that.

    Landed in 58f2301, with 19 tests covering the removal inverses and the consent parsing.

    On your suggestion 1

    Move wmux browser and wmux markdown into optional Claude skills

    I did not do this, and I want to say why rather than let it sit unanswered. Those two are the reason the instructions block exists — they are how an agent discovers that a browser panel and a markdown view exist at all — so packaging them as installable skills is a real design question about discoverability, not a mechanical move. What I have done instead is make the block refusable and removable, which addresses the consent half of your report completely. If you want to open a separate issue for the skills packaging, I will engage with it on its own terms.

    Not yet done

    Support both global and per-project installation

    Not in this release. The consent record is global, and per-project scoping means deciding what a project-local grant even means when one wmux window has workspaces in several repos. That is worth doing and worth thinking about properly; I have not fudged it into this release. Please open a separate issue if you want it tracked, or say so here and I will.

    Thanks for filing this with a fork and a commit attached. It is a fair criticism and the app is better for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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