Skip to content

setup --off does nothing when no TARGET is given, and re-installs the wiring instead #4

Description

@idrmn

Summary

secondwind setup --off is the documented way to remove the wiring. With no TARGET, setup::run ignores the off parameter and runs the install path again. The MCP server stays registered and the Bash hook stays installed.

Environment

  • secondwind 0.3.2, built from git ab3888a
  • Claude Code 2.1.220, Arch Linux
  • Wiring installed with secondwind setup --hook

Repro

$ secondwind setup --off
  ✓ mcp   already registered
  - hook  skipped (add with: secondwind setup --hook)

restart Claude Code to pick up the tools, then `secondwind check`

~/.claude/settings.json still holds the PreToolUse hook, and ~/.claude.json still holds the secondwind MCP server. secondwind check reports both as installed.

Code

crates/cli/src/setup.rs:13-65: run() reads off only inside the if let Some(name) = target branch, which calls route_agent. The path with no target calls register_mcp and install_hook and never reads off.

Impact

The help text for --off says "Remove secondwind's wiring from the agent". A user who wants to uninstall the Claude Code wiring gets the opposite result and no warning. The removal has to be done by hand, in two files.

Suggested fix

Honour off in the path with no target: remove the secondwind entry from mcpServers in ~/.claude.json and the secondwind hook entry from hooks.PreToolUse in ~/.claude/settings.json. If that is out of scope, make the flag fail with a clear message when no TARGET is given.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions