Claude and most other of the top coding agents will check the codebase for existing patterns and functionality specifically so it doesn’t duplicate behaviours etc. Have you used any of them recently? That’s one of the first things it does before even writing a line of code.
I use Claude/Codex, if it finds a thingy that’s reusable it’ll use it but it’ll never create it or ask if it should be created in my experience. I find that it doesn’t create new components but just replicates the existing one.
Within same file is a different story though, it does write helper functions to share logic which is proper.
Claude and most other of the top coding agents will check the codebase for existing patterns and functionality specifically so it doesn’t duplicate behaviours etc. Have you used any of them recently? That’s one of the first things it does before even writing a line of code.
I use Claude/Codex, if it finds a thingy that’s reusable it’ll use it but it’ll never create it or ask if it should be created in my experience. I find that it doesn’t create new components but just replicates the existing one.
Within same file is a different story though, it does write helper functions to share logic which is proper.