[BUG] Main agent (even with --append-system-prompt) ignores Claude.md rules, workflows, /commands, hooks, and orchestration instructions

Resolved 💬 3 comments Opened Jul 31, 2025 by ALeslie743 Closed Aug 19, 2025

Environment

  • Platform (select one):
  • [X ] Anthropic API*
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [X] *Anthropic API via Claude Max Subscription
  • Claude CLI version: 1.0.64
  • Operating System: Windows 11
  • Terminal: VSCode Powershell Terminal

Bug Description

  • Claude sub-agents invoked example https://github.com/wshobson/agents but could be anything with a custom system prompt
  • Custom workflows and commands defined, but inherently require the main agent/CLI to act as an orchestrator because that's where the user interacts.
  • Subagents can have a mini-system prompt, so their behaviour is spot-on (work quality on individual files is very good)
  • Subagents pass advice and statuses back to main terminal agent
  • Main terminal agent Continually, repeatedly ignores subagent advice, workflow steps, clear instructions from user, claude.md (project or system level) rules, or otherwise breaks workflows.
  • Non-blocking hooks regularly and consistently ignored.
  • Blocking hooks not realistic, as almost every action (after approximately 1-2 minutes of autonomous operation) results in a violation of at least one rule, command, workflow, etc...

Steps to Reproduce

  1. Establish a non-blocking hook: pretoolcall; matcher: edit + mult_edit tools. calls a "reminder.json" reminds claude: append-system-prompt with: "No emojis, use KISS, SOLID, YAGNI, SSOT, DRY. Obey: Structure.md, architecture.md" (I realize this isn't how append-system-prompt works, but I hoped it would be a strong suggestion)
  2. Establish Claude.md with clear rules:

A. Use KISS, SOLID, YAGNI, SSOT, DRY principles in all tasks
B. Do not add new features, assume features, or change features unless specified in a design document or user interaction
C. Obey directory structure in structure.md
D. Obey Architectural references
E. Update all documentation following a todo task being completed
F. When orchestrating other agents, carefully pass inputs and outputs to them to coordinate work.
G. DO NOT use emojis anywhere in code or text files.

  1. Download OR create subagents (such as "https://github.com/wshobson/agents" for example)
  2. Ask Claude via terminal to invoke those subagents for any combination of workflow or commands

A. Type "please have a frontend agent make a new welcome page and then have a testing agent test it according to the test plan. Iterate through tests and code modifications, ensuring all code and patterns are respected. Then have a UI/UX agent ensure it is well situated and placed in the navigation hierarchy. Finally, have a content agent generate welcome content based on the RSS feed from <list some feed>. I expect this to be implemented, iterated, and tested following KISS, SOLID, YAGNI, SSOT, and DRY principles. You should pick the best agents for the job and coordinate their behavior, inputs, and outputs. Use extended thinking mode for this. ALl relevant documentation at the module, component, and system level must be updated at the end. All code modules, tests, test runs, and implementation summaries must be placed according to root\structure.md. OBEY CLAUDE.MD RULES
B. OR: use a custom /commands that says the same thing: "/build" (where "/build" uses the --append-system-prompt flag to say what I typed above)

  1. Using --append-system-prompt in workflow or command doesn't do anything, and when used in the command, the appended portion is quickly forgotten. If I type it, it's similarly quickly forgotten

Expected Behavior

  • Claude main agent will consider the request and select subagents
  • Claude's main agent has recognized the appended system prompt and is more careful / rule following
  • A todo list will be generated for that main agent and shown to the user
  • Claude main agent will thoroughly pass inputs/outputs and results to the subagents
  • The subagents will run and complete their work in the order specified and according to the principles mentioned
  • The code will be appropriately placed in the structure according to structure.md
  • The tests will have been run and a test plan in place according to my test plan.md, with a result file generated (according to structure.md)

Actual Behavior

  • As this is non-deterministic, every time I attempt this I get varying levels of quality, completeness, and adherence
  • No evidence that the --append-system-prompt has meaningfully changed the main agent's behaviour
  • There are emojis everywhere (violates claude rules and hook) after file edits
  • Architectural references often read but not respected (violates the command, rules, and hook)
  • Documentation is often read but neither respected nor updated (violates the request or command and rules)
  • subagents appear to have done work, but it is disconnected and obviously not orchestrated (not effective completion of user request)
  • new files, folders, and documents proliferate everywhere (violates claude rules)
  • Even simple files become over-engineered after 2-3 minutes of runtime and appear to suffer tunnel vision (violating KISS, SOLID, YAGNI)
  • Additional features and very often added (violating YAGNI and KISS)
  • Code modules have repeated custom methods within the code (violating DRY and SOLID)

Additional Context

I realize some of this may come down to the quality of my instructions and my own creativity and skill. However, even with strong rules, commands, and workflows, claude regularly reverts to "run down the rabbit hole as fast as possible and claim the tasks are complete". For enterprise development, I want a more methodical and careful claude, even if that will cost more or take longer.

View original on GitHub ↗

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