[BUG] Agent repeatedly ignores trigger handler pattern - puts inline logic in trigger instead of service class (Correction BASH on Windows)

Resolved 💬 3 comments Opened Jan 24, 2026 by JoshNorvellITD Closed Jan 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

  • 3+ days, 20+ corrections on same issue
  • Repeatedly put deletion logic inline in trigger when told to put it in service class
  • Added extra method when explicitly told ONE method only
  • Failed to read own notes before making edits
  • User had to repeat the same instruction ("put it in the service class that's called by the trigger") 20+ times

What Should Happen?

When given explicit architecture instructions (e.g., "trigger calls service class, all logic in service class"):

  1. Agent should read and acknowledge the instruction
  2. Agent should follow the instruction on the first attempt
  3. When corrected, agent should not repeat the same mistake
  4. Agent should read project notes before making edits

Error Messages/Logs

Steps to Reproduce

  1. Create project notes with explicit architecture rules: - "Trigger should ONLY call service class"
  • "ALL deletion logic in service class"
  • "ONE method: deleteUnits()"
  1. Ask agent to modify error messages in the deletion feature
  2. Observe: Agent puts deletion logic inline in trigger instead of service class
  3. Correct agent: "Put it in the service class that's called by the trigger"
  4. Ask agent to make another change
  5. Observe: Agent repeats the same mistake - puts logic inline in trigger again
  6. Have an accepted version of the file that agent refers back to even though it's been stated there was a change
  7. Repeat steps 4-6 approximately 20 times over 3+ days

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code CLI: 2.1.19

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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