Enhancement: Proactive tool/plugin discovery and stricter CLAUDE.md / AGENTS.md rule adherence

Resolved 💬 6 comments Opened Mar 21, 2026 by sanderPostma Closed Apr 24, 2026

Summary

Claude Code should proactively discover and use installed tools/plugins (like the beads MCP) without needing explicit user reminders, and should treat rules in CLAUDE.md / AGENTS.md as hard constraints — not soft suggestions.

Current Behavior

  • Plugin blindness: Even with a beads MCP installed and documented in CLAUDE.md (with the GSD/beads protocol explicitly mandated), Claude rarely uses it autonomously. It defaults to prose planning and in-memory task tracking instead of the installed task graph tool.
  • Rule drift: Rules like 'never use process-kill-by-name', 'always stagger worker launches', 'never kill workers without explicit PID approval' are followed inconsistently. The model acknowledges violations after the fact rather than preventing them upfront.
  • Passive compliance: Claude waits to be reminded about installed tools rather than checking what's available at session start and using the right tool for the job.

Desired Behavior

  • Active tool inventory: At session start (or on first relevant task), Claude should scan available MCP tools and match them to the work at hand — e.g. if beads is installed and CLAUDE.md mandates its use for task tracking, use it without being told.
  • Hard rule enforcement: CLAUDE.md / AGENTS.md rules should function like a type system — violations should be caught before action, not apologized for after. Especially for destructive/irreversible operations (killing processes, deleting records, mass operations).
  • Constraint propagation: Prohibitions in CLAUDE.md should be checked against every relevant command before execution, not recalled only when the user notices a violation.

Context

This was observed in a real overnight ML training session where:

  1. A kill-by-name pattern was used despite an explicit memory rule against it, causing a legitimate worker to be stopped
  2. Workers were launched in bulk simultaneously despite a 'stagger launches' rule, causing connection storms to the data server
  3. The beads task tracking MCP went unused throughout a multi-hour session despite being installed and mandated in CLAUDE.md

User reports that competing models handle this significantly better — reading AGENTS.md strictly and using installed plugins autonomously for task management.

Suggested Implementation Approaches

  1. SessionStart hook integration: On session start, enumerate available MCP tools and cross-reference with CLAUDE.md mandates
  2. Rule extraction pass: Parse CLAUDE.md for explicit prohibitions and apply them as pre-flight checks — similar to how PreToolUse hooks work but built into the behavioral layer
  3. Constraint memory: Persist violated rules with higher salience so they are actively checked before related actions, not just stored in memory files

Impact

Medium-high. Affects reliability of autonomous overnight operation where the user cannot intervene. One incident cost ~1 hour of GPU compute time on a rented machine.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗