# Claude Trigger Patterns for Past Conversation Detection: A Complete Technical Guide

> Discover Claude's four trigger patterns for past conversation detection: explicit references, temporal cues, implicit signals, and assumptive questions. Learn how these activate conversation search tools.

- Repository: [Ásgeir Thor Johnson/system_prompts_leaks](https://github.com/asgeirtj/system_prompts_leaks)
- Tags: deep-dive
- Published: 2026-02-16

---

**Claude identifies references to past conversations using four distinct trigger pattern categories—explicit references, temporal cues, implicit signals, and assumptive questions—that activate the `conversation_search` or `recent_chats` tools when detected in user input.**

The leaked system prompts from Anthropic's Claude models reveal the exact mechanisms the AI uses to determine when to search through previous dialogue history. According to the `asgeirtj/system_prompts_leaks` repository, these trigger patterns are hardcoded into Claude's system instructions to enable contextual memory across sessions.

## How Claude Detects References to Past Conversations

Claude's ability to reference previous conversations depends on pattern matching against specific linguistic triggers defined in its system prompts. When the model detects any of these patterns in user input, it invokes specialized tools—either `conversation_search` for content-based lookups or `recent_chats` for time-based retrieval—to fetch relevant historical context before generating a response.

This trigger-based approach allows Claude to maintain the illusion of continuous memory without actually retaining conversation state between sessions, instead searching indexed chat history when linguistic cues indicate the user expects continuity.

## The Four Categories of Claude Trigger Patterns

The system prompts categorize trigger patterns into four distinct types, each capturing different ways users naturally reference previous interactions.

### Explicit References

These are direct linguistic markers where the user explicitly mentions prior conversation. The prompt identifies phrases like "continue our conversation about...", "what did we discuss...", and "as I mentioned before..." as clear signals that the user expects Claude to recall specific previous exchanges.

These patterns appear in [`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md) at lines 18-27, where the system instructions enumerate explicit reference markers that immediately trigger the conversation search workflow.

### Temporal References

Time-based cues indicate the user is looking for conversations from specific periods. The prompts recognize patterns like "what did we talk about yesterday", "show me chats from last week", and references to specific dates as triggers for the `recent_chats` tool rather than content-based search.

When Claude detects these temporal markers, it prioritizes chronological retrieval over semantic search, assuming the user wants to browse or reference interactions from a specific timeframe rather than find discussions about a particular topic.

### Implicit Signals

These are subtle linguistic cues where users assume shared knowledge without explicit reference. The prompts identify past-tense verbs ("you suggested", "we decided", "you thought"), possessive cues ("my project", "our approach"), definite articles assuming shared context ("the bug", "the strategy"), and pronouns without clear antecedents ("help me fix it", "what about that?") as implicit triggers.

These patterns are particularly important because they capture the natural way humans refer to ongoing work—using "the" to refer to previously discussed projects or "it" to reference earlier problems—allowing Claude to recognize when users assume continuity even without explicit memory requests.

### Assumptive Questions

Direct questions that ask Claude to recall information serve as the final trigger category. Phrases like "did I mention...", "do you remember...", and "what was that..." explicitly request memory retrieval and immediately trigger the conversation search tools.

These questions make the memory request explicit, differing from implicit signals by directly asking the model to confirm or retrieve previous statements rather than assuming the information is already active in context.

## Source Code Location and Implementation Details

The trigger patterns are defined in the system prompt files within the `asgeirtj/system_prompts_leaks` repository. The primary source is:

- **[`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md)** (lines 18-27): Contains the definitive list of trigger patterns for the current Claude Opus model, including the four-category framework and specific examples for each trigger type.

Historical versions maintain the same pattern structure:

- **[`Anthropic/old/claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-opus-4.5.md)** (lines 30-38): Legacy prompt with identical trigger categories, confirming the stability of this detection approach across versions.
- **[`Anthropic/old/claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.5-sonnet.md)** (lines 38-46): Sonnet variant implementing the same trigger pattern logic for consistent cross-model behavior.

These files reveal that Claude's memory detection is not based on semantic embedding similarity alone, but on explicit regex-style pattern matching against these predefined linguistic markers before deciding to invoke search tools.

## Practical Implementation: Detecting Triggers in Python

Developers can implement similar trigger detection logic using regular expressions based on the patterns found in Claude's system prompts. Below are practical implementations that mirror Claude's detection strategy.

### Basic Trigger Detection

This implementation checks user input against the four categories of trigger patterns:

```python
import re

# Trigger patterns derived from Claude Opus 4.6 system prompt

TRIGGER_PATTERNS = {
    'explicit_reference': [
        r'\bcontinue (our|the) conversation\b',
        r'\bwhat (did|was) we (discuss|talk about)\b',
        r'\bas i (mentioned|said) before\b',
        r'\bgoing back to (what|our)\b'
    ],
    'temporal_reference': [
        r'\byesterday\b',
        r'\blast week\b',
        r'\b(show me|what about) chats? from (yesterday|last week)\b',
        r'\bprevious (conversation|chat|session)\b'
    ],
    'implicit_signal': [
        r'\b(you|we) (suggested|decided|agreed|thought|recommended)\b',
        r'\bmy (project|approach|code|file)\b',
        r'\bour (approach|strategy|discussion)\b',
        r'\bthe (bug|strategy|issue|problem|solution)\b',
        r'\b(help me fix|what about) (it|that|this)\b'
    ],
    'assumptive_question': [
        r'\bdo you remember\b',
        r'\bdid i (mention|ask|say)\b',
        r'\bwhat was that\b',
        r'\bcan you recall\b'
    ]
}

def detect_triggers(user_input: str) -> dict:
    """
    Detect trigger patterns in user input.
    Returns dictionary of matched categories and specific patterns.
    """
    lowered = user_input.lower()
    matches = {}
    
    for category, patterns in TRIGGER_PATTERNS.items():
        found = [p for p in patterns if re.search(p, lowered)]
        if found:
            matches[category] = found
            
    return matches

def should_search_past_chats(user_input: str) -> bool:
    """Boolean check if input contains any trigger patterns."""
    return bool(detect_triggers(user_input))

# Example usage

test_messages = [
    "Can you continue our conversation about the API design?",
    "What did we decide about the caching layer yesterday?",
    "You suggested using Redis, but I think we should reconsider.",
    "Help me fix it.",
    "This is a new topic with no history."
]

for msg in test_messages:
    triggers = detect_triggers(msg)
    if triggers:
        print(f"📝 '{msg}'")
        print(f"   Triggers found: {list(triggers.keys())}\n")

```

### Tool Selection Logic

Once triggers are detected, the system must decide which retrieval tool to invoke—mirroring Claude's choice between `conversation_search` and `recent_chats`:

```python
def select_retrieval_tool(user_input: str) -> str | None:
    """
    Determine which past-chat tool to invoke based on trigger types.
    Returns: 'recent_chats', 'conversation_search', or None
    """
    lowered = user_input.lower()
    triggers = detect_triggers(user_input)
    
    # Priority 1: Temporal references indicate time-based lookup

    if 'temporal_reference' in triggers:
        return 'recent_chats'
    
    # Priority 2: Content-based triggers (explicit, implicit, assumptive)

    content_triggers = ['explicit_reference', 'implicit_signal', 'assumptive_question']
    if any(t in triggers for t in content_triggers):
        return 'conversation_search'
    
    return None

# Example usage

messages = [
    "What did we talk about yesterday?",           # → recent_chats

    "Continue our conversation about Python",      # → conversation_search  

    "You suggested using async/await",             # → conversation_search

    "Hello, nice to meet you"                      # → None

]

for msg in messages:
    tool = select_retrieval_tool(msg)
    print(f"'{msg}' → {tool}")

```

These implementations replicate the logic found in [`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md), allowing developers to build preprocessing layers that anticipate when Claude will attempt to retrieve historical context.

## Summary

Claude identifies references to past conversations through a sophisticated **trigger pattern detection system** defined in its system prompts. The key takeaways from the leaked `asgeirtj/system_prompts_leaks` repository include:

- **Four distinct trigger categories** govern detection: explicit references ("continue our conversation"), temporal cues ("yesterday"), implicit signals ("you suggested"), and assumptive questions ("do you remember").
- **Pattern matching precedes tool invocation**—when triggers are detected, Claude selects between `conversation_search` for content-based lookups and `recent_chats` for time-based retrieval.
- **Source definitions** reside in [`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md) (lines 18-27) with identical logic preserved in legacy prompts including [`claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/claude-opus-4.5.md) and [`claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/claude-4.5-sonnet.md).
- **Regex-based detection** can be replicated programmatically using the specific patterns found in the system prompts, enabling applications to predict when historical context retrieval will occur.

## Frequently Asked Questions

### What are trigger patterns in Claude?

Trigger patterns are specific linguistic markers defined in Claude's system prompts that signal when a user is referring to previous conversations. These patterns include explicit phrases like "continue our conversation," temporal references like "yesterday," and implicit cues like "you suggested." When detected, these triggers initiate the retrieval of historical chat data through specialized tools.

### How does Claude decide between conversation_search and recent_chats?

Claude selects the retrieval tool based on the type of trigger detected. According to the system prompts in [`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md), temporal references (such as "last week" or "yesterday") trigger the `recent_chats` tool for time-based retrieval. All other trigger types—including explicit references, implicit signals, and assumptive questions—activate `conversation_search` for content-based semantic lookup.

### Where are these trigger patterns documented?

The definitive trigger patterns are documented in the leaked system prompt files within the `asgeirtj/system_prompts_leaks` repository. The primary source is [`Anthropic/claude-opus-4.6.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/claude-opus-4.6.md) at lines 18-27. Identical pattern lists appear in legacy versions including [`Anthropic/old/claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-opus-4.5.md) (lines 30-38) and [`Anthropic/old/claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.5-sonnet.md) (lines 38-46).

### Can developers implement similar trigger detection?

Yes, developers can replicate Claude's trigger detection using regular expressions based on the patterns found in the leaked prompts. The detection logic involves matching user input against four categories of regex patterns: explicit references, temporal cues, implicit signals, and assumptive questions. Once detected, applications can route requests to appropriate retrieval systems, mirroring Claude's decision framework between time-based and content-based search tools.