Skip to content

feat(tools): add excluded_tools to stop linking into tools you never run - #19

Merged
urmzd merged 1 commit into
mainfrom
feat/tool-exclusions
Sep 12, 2026
Merged

urmzd merged 1 commit into
mainfrom
feat/tool-exclusions

Conversation

@urmzd

@urmzd urmzd commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

CodingTool::is_installed only checks that a tool's config directory exists. Any directory another program owns therefore makes a tool look installed, and there is no way to tell agentspec otherwise.

~/.gemini is the worst case. Antigravity keeps it live, so gemini-cli always registers as installed. manage unlink removes its links and the next sync puts them straight back, as real file copies. On one machine that was 781 links across five tools that had never been run (cline, windsurf, openhands, cursor, gemini-cli), out of 1,327 total.

Deleting the directories is not a fix: ~/.gemini holds 1GB of live Antigravity data.

  • feat: add excluded_tools: Vec<String> to Config and filter it in installed_tools(), the single choke point all 12 linking callers already route through. Read once per process via OnceLock, since some callers invoke installed_tools() inside a loop.
  • feat: new tools::is_excluded(slug).
  • fix: agentspec tools reported excluded tools as installed. Its own doc comment says the table exists to answer "why isn't agentspec touching X", so this contradicted the command's stated purpose. It now marks them and prints a count.

Usage:

excluded_tools:
  - gemini-cli
  - cursor

Test plan

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (152 passing, including two new cases covering a populated and an empty exclusion list)
  • Verified end to end: 1,327 links pruned to 701, then two consecutive sync --fast runs with zero drift. Before the change the same sync re-added 462 links.
  • CI passes

`CodingTool::is_installed` only checks that a tool's config directory
exists, so any directory another program owns makes a tool look
installed. `~/.gemini` is the worst case: Antigravity keeps it live, so
gemini-cli always registers and `sync` pulls its links back in even
after `manage unlink` removes them. On one machine that was 781 links
across five tools that had never been run.

Add `excluded_tools` to `Config` and filter it in `installed_tools()`,
the single choke point every linking path already goes through. The
list is read once per process via `OnceLock` because some callers
invoke `installed_tools()` inside a loop.

`agentspec tools` reported excluded tools as installed, which directly
contradicts its own promise to answer "why isn't agentspec touching X".
It now marks them with a dim marker and prints a count.
@urmzd
urmzd merged commit f664b4c into main Sep 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant