You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
init --agents <subset> silently converges: README/--help say "wire only these", but it also removes other hosts' user-level wiring #482
Narrowed after a closer search: the --dry-run omission is already tracked in #329 (retraction targets are on its list), and the retraction itself was introduced on purpose in #247, whose description calls it "a behaviour change worth knowing about". What remains here is that nothing tells the user, and that the blast radius reaches outside the repo.
Summary
graft init --agents <subset> converges: it retracts the wiring of every host not listed (added in #247). The README and --help still describe the flag as additive — "wire only these agents", "graft init --agents claude to … wire Claude Code alone" — and neither mentions that the retraction also removes user-level files for the unlisted hosts: mcpServers.graft in ~/.claude.json, the four graft hooks + helpers/graft-hooks.cjs under ~/.claude, ~/.codex/hooks.json + ~/.codex/hooks/graft/ + [mcp_servers.graft] in ~/.codex/config.toml, and ~/.gemini/skills/graft/SKILL.md.
In a repo already wired for Claude Code (global + project), I added Hermes:
graft init --agents hermes --no-build
Beyond the repo-level removals (project .mcp.json lost its only key and was deleted), every user-level Claude Code, Codex and Antigravity wiring on the machine was removed — so all repos lost graft's hooks and MCP server, not just this one. The - removed … — agent not selected lines do print, but only after the fact, and a user reading the README has no reason to expect a repo-scoped command to edit ~/.claude.json.
Asks
Document convergence in the README --agents row and in graft init --help: "wires only these and removes graft's wiring for every other host, including user-level files; pass every host you use".
Consider scoping the retraction of scope: 'global' targets: only retract a host's user-level files when the user asks (--converge/--only, or uninstall), or when no other wired repo still selects that host. A repo-level --agents choice removing another agent's machine-wide config is a large blast radius for a flag that reads as additive.
Workaround
Always pass the full list of hosts wired on the machine (e.g. --agents claude agents antigravity hermes), or copy the fenced instruction block by hand instead of running init to add one agent's section.
Related: #247 (introduced convergence), #329 (--dry-run should list retractions), #118 (reconcile rewrites .mcp.json).
changed the title [-]init --agents <subset> retracts every other host's wiring, including user-level files, and --dry-run does not show it[/-][+]init --agents <subset> silently converges: README/--help say "wire only these", but it also removes other hosts' user-level wiring[/+]on Sep 26, 2026
Activity
[-]init --agents <subset> retracts every other host's wiring, including user-level files, and --dry-run does not show it[/-][+]init --agents <subset> silently converges: README/--help say "wire only these", but it also removes other hosts' user-level wiring[/+]fix: port 5 Windows and correctness fixes from Trail-Code forks (#15)