[FEATURE] Suggest memory rules from repeated user corrections

Status Open
Maintainer reply None cached
Activity 2 comments · opened Oct 11, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I correct Claude about the same project-specific things across sessions, for example:

  • "use pnpm, not npm"
  • "don't edit generated files under src/gen/"
  • "tests go next to the source, not in __tests__"

Memory and CLAUDE.md solve this, but only if I stop what I'm doing and write the rule. In practice most corrections never make it into memory, so I repeat them next week.

Claude Code already sees the signals: a denied tool call with feedback, a rejected edit, a rewind followed by a rephrased prompt, or a message that immediately contradicts the last action.

Proposed Solution

  1. Spot corrections. Detect correction signals during the session, as listed above.
  2. Suggest a rule at a quiet moment: at the end of a session, or when the same correction comes up a second time.

> You corrected me twice about using pnpm instead of npm.
> Save this rule? → [Project CLAUDE.md] [User memory] [Dismiss]
>
> Proposed text: Use pnpm for all package commands; never npm or yarn.

  1. Never save silently. Always show the exact text and the target file. Dismissed suggestions are not offered again.

Alternative Solutions

  • Writing rules by hand with # or /memory: works, but depends on me remembering in the moment.
  • A Stop hook that parses the transcript: possible, but it can't reliably tell a correction from normal back-and-forth without the harness's own view of denials and rewinds.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

  1. On Monday Claude runs npm install and I deny it: "we use pnpm".
  2. On Wednesday it happens again in a new session.
  3. Claude Code suggests saving the rule to the project's CLAUDE.md. I accept, and it never happens again, for me or for teammates who use the same repo.

View original on GitHub ↗

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