Explicit Memory Management via "Remember" Directives

Resolved 💬 7 comments Opened Oct 30, 2025 by cnighswonger Closed Jan 9, 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

When a user says "remember that we can't use library X because of constraint Y," Claude Code may acknowledge this in the conversation but doesn't take any action to persist this information. In subsequent sessions or later in the same conversation, this context may be forgotten or lost.

This creates a significant UX gap: users must manually document important decisions and constraints, or repeatedly re-explain context to Claude Code. This defeats the purpose of having an agentic coding assistant that should learn and retain project-specific knowledge.

Relationship to Existing Issues: This builds on the concept proposed in #87 (Advanced Memory Tool for Claude Code), but focuses specifically on user-commanded memory persistence rather than automatic background memory. While #87 proposes a general memory system, this request addresses the specific UX pattern of explicit user directives triggering intelligent, immediate persistence decisions.

Proposed Solution

When Claude Code detects explicit memory directives (e.g., "remember that," "don't forget," "keep in mind"), it should:

  1. Recognize the directive as a signal to persist information
  2. Intelligently choose the appropriate persistence mechanism:
  • Project-wide decisions/conventions → Create/update PROJECT_CONTEXT.md or similar
  • Code-specific patterns → Add inline comments or docstrings
  • Tool/library decisions → Update README or dependencies documentation
  • Workflow preferences → Create/update .clinerules or configuration files
  1. Execute the file modification immediately
  2. Confirm the action to the user (e.g., "I've added that to PROJECT_CONTEXT.md")

Technical Feasibility: Claude Code already has the necessary primitives (file reading/writing, context awareness). This feature primarily requires:

  • Pattern recognition for memory directives
  • Decision logic for choosing persistence mechanisms
  • Integration into the conversation flow

Alternative Solutions

  1. Continue relying on users to manually maintain CLAUDE.md - This places unnecessary cognitive burden on developers and is error-prone
  2. Implement fully automatic background memory (as proposed in #87) - While valuable, this lacks the explicit control and immediate feedback that user-directed persistence provides
  3. Require users to specify the persistence location (e.g., "remember that in PROJECT_CONTEXT.md") - This is more explicit but removes the intelligence and convenience of automatic decision-making

The proposed solution strikes the best balance: explicit user control over when to remember, with intelligent automation of how and where to persist.

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

User: "We discovered that the API rate limits us to 10 requests/second. Remember that."

Claude Code: "I've documented this in PROJECT_CONTEXT.md under 'API Constraints' so I'll apply this limit in future implementations."
[Creates/updates PROJECT_CONTEXT.md with the rate limit information]

Additional Use Cases:

  • Workflow preferences: "Remember that we always run tests with npm run test:coverage. Don't forget." → Updates .clinerules
  • Architecture decisions: "Remember that we're using repository pattern for data access, not active record." → Updates PROJECT_CONTEXT.md
  • Code-specific patterns: "Remember that this function needs to handle the null case because the upstream API sometimes returns null." → Adds inline comment
  • Tool constraints: "Remember we can't use async/await in this legacy module because it needs to support Node 10." → Updates README or comments

Benefits:

  • Reduces cognitive load on developers who currently must manually document decisions
  • Prevents repeated mistakes from forgotten context
  • Makes Claude Code behave more like a true coding partner with persistent knowledge
  • Provides immediate, explicit confirmation of what was remembered and where
  • Works alongside existing memory systems rather than replacing them

Additional Context

User Experience Motivation:
This feature addresses a common frustration where users find themselves repeatedly explaining the same project constraints, architectural decisions, and conventions to Claude Code across sessions or after context compaction. The "remember that" pattern is a natural conversational cue that users already use intuitively, expecting the AI to act on it.

Current Workarounds:
Users currently work around this by:

  • Manually maintaining CLAUDE.md or PROJECT_CONTEXT.md files
  • Repeatedly re-explaining context when it's forgotten
  • Adding comments to code as reminders (which Claude Code may or may not read)
  • Keeping separate documentation that they have to explicitly reference

All of these workarounds require the user to context-switch from their primary task and manually manage what should be automated.

Why This Complements #87:
While #87 proposes automatic background memory, this feature provides explicit user control with immediate feedback. Some information should be remembered automatically, but users also need the ability to explicitly mark something as important ("remember this") and get confirmation that it was persisted. The two approaches are complementary, not competing.

Implementation Note:
The intelligence in choosing where to persist information (PROJECT_CONTEXT.md vs inline comments vs .clinerules) is key to making this feel seamless rather than requiring users to specify the location manually.

View original on GitHub ↗

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