Skip to content

bug: .claude/plugins/ is missing from the fleet-wide gitignore — installed plugin caches get auto-committed into agent repos #1702

Closed

Description

@vybe

Summary

_GITIGNORE_PATTERNS in src/backend/services/git_service.py ignores six .claude/* runtime directories under an explicit policy comment — "Claude Code runtime — commit commands/skills/agents, exclude runtime data" — covering .claude/projects/, .claude/statsig/, .claude/todos/, .claude/debug/, .claude/sessions/, and .claude/shell-snapshots/. .claude/plugins/ is absent from that list.

Claude Code installs marketplace plugins into ~/.claude/plugins/cache/<plugin>@<version>/ (a full copy of each plugin: skills, agents, hooks). Because a Trinity agent's HOME is its git repo root (ENV HOME=/home/developer, WORKDIR=/home/developer, repo at the same path), that cache lands inside the agent's git working tree and is auto-committed by the 15-minute sync loop — the same repo-bloat class as #1596, just via a different writer.

Context

Found while reviewing the platform skill-injection work (abilityai/trinity-enterprise#183), which had to add per-skill .gitignore lines and untracking for exactly this reason: anything the platform or the agent writes under ~/.claude/ is inside the repo by construction.

This is a path users are actively steered onto — CLAUDE.md recommends /plugin marketplace add abilityai/abilities and the trinity plugin is meant to be installed by agents (/trinity:onboard). Every plugin install is a fresh directory tree committed to the agent's GitHub repo, and every plugin update commits another copy.

Acceptance Criteria

  • .claude/plugins/ added to _GITIGNORE_PATTERNS alongside the existing Claude Code runtime entries
  • Existing agents pick it up through the idempotent gitignore merge on next sync, and already-committed matches are untracked via the git rm --cached path added in bug: git-sync agent workspaces grow unboundedly — auto-committed data churn bloats .git (44GB observed on one agent) #1596 (stops future churn; does not shrink existing history)
  • Verified against a live agent with a plugin installed: the plugin cache no longer appears in git status, and the plugin still loads afterwards
  • Open question resolved before closing: does plugin install state need a committed manifest to survive a container recreate? Claude Code records installed plugins in ~/.claude.json, which is already gitignored — so a recreated agent may silently lose its plugins today. If that is the case, track it as its own issue rather than un-ignoring the cache (a re-installable cache does not belong in git either way)

Technical Notes

Activity

  1. added
    priority-p2
    type-bug
    theme-infrastructure
    complexity-low
    status-ready
    on Jul 20, 2026
  2. added
    status-in-progress
    and removed
    status-ready
    on Jul 20, 2026
  3. self-assigned this
    on Jul 20, 2026
  4. added
    status-in-dev
    and removed
    status-in-progress
    on Jul 20, 2026
  5. removed
    status-in-dev
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p2theme-infrastructuretype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions