# How Claude Formats Chat Links When Referencing Past Conversation Search Results

> Learn how Claude formats chat links from past conversation search results into clickable Markdown URLs. Discover the `https://claude.ai/chat/{uri}` format.

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

---

**Claude converts raw `<chat>` XML tags from conversation search results into clean, clickable Markdown links using the format `https://claude.ai/chat/{uri}`.**

When Claude retrieves historical conversation snippets using the internal *conversation_search* tool, the system must transform machine-readable metadata into user-friendly references. According to the leaked system prompts in the `asgeirtj/system_prompts_leaks` repository, this formatting follows strict rules defined across multiple Anthropic model configurations.

## The Raw Conversation Search Response

When Claude queries past conversations, the raw response contains an XML-like `<chat>` tag with three critical attributes. This structure appears in the internal tool output before any user-facing formatting is applied.

The raw tag follows this schema:

```xml
<chat uri='12345abcdef' url='https://claude.ai/chat/12345abcdef' updated_at='2024-12-01T15:30:00Z'></chat>

```

- **`uri`**: The unique identifier for the conversation
- **`url`**: The full canonical URL (redundant with the URI)
- **`updated_at`**: ISO 8601 timestamp of the last conversation activity

Claude never exposes this raw XML to users. Instead, the system prompt instructions mandate specific transformation rules.

## How Claude Formats Chat Links for Display

The canonical format for presenting conversation references is explicitly defined in multiple system prompt files. Claude must extract the `uri` attribute from the `<chat>` tag and construct a clickable Markdown link pointing to `https://claude.ai/chat/{uri}`.

This rule appears in [`Anthropic/old/claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-opus-4.5.md) at lines 107-110:

> "Always format chat links as a clickable link like: `https://claude.ai/chat/{uri}`"

The same instruction appears in:
- [`Anthropic/old/claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.5-sonnet.md) at lines 44-46
- [`Anthropic/old/claude-4.1-opus-thinking.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.1-opus-thinking.md) at lines 96-100

When synthesizing search results, Claude generates natural language summaries of the retrieved conversation content, then appends the formatted link using the extracted URI. The result is a clean, copy-paste-ready URL such as `https://claude.ai/chat/12345abcdef`.

## Practical Implementation Example

To replicate Claude's chat link formatting in your own applications, extract the `uri` attribute from the conversation search response and concatenate it with the base URL.

Here is a JavaScript implementation that mirrors Claude's internal logic:

```javascript
/**
 * Transform a <chat> tag payload into a Claude-formatted URL.
 * @param {string} uri - The unique identifier from the <chat> tag.
 * @returns {string} The formatted Claude chat URL.
 */
function formatClaudeChatLink(uri) {
  const baseUrl = 'https://claude.ai/chat/';
  return `${baseUrl}${uri}`;
}

// Example usage:
const conversationUri = 'a1b2c3d4e5';
const chatLink = formatClaudeChatLink(conversationUri);

console.log(chatLink);
// Output: https://claude.ai/chat/a1b2c3d4e5

```

When embedding this in Markdown responses, the URL renders as a clickable link in most modern chat interfaces and documentation systems.

## Summary

- Claude receives conversation search results wrapped in `<chat uri="..." url="..." updated_at="...">` XML tags.
- System prompts in `asgeirtj/system_prompts_leaks` mandate converting these to the format `https://claude.ai/chat/{uri}`.
- This formatting rule is explicitly defined in [`claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/claude-opus-4.5.md), [`claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/claude-4.5-sonnet.md), and [`claude-4.1-opus-thinking.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/claude-4.1-opus-thinking.md).
- The resulting links are clean, clickable, and point directly to the Claude web interface for the referenced conversation.

## Frequently Asked Questions

### What is the exact URL structure Claude uses for chat links?

Claude uses the structure `https://claude.ai/chat/{uri}`, where `{uri}` is the unique identifier extracted from the `uri` attribute of the raw `<chat>` tag. This creates a direct link to the specific conversation in the Claude web interface.

### Where are the chat link formatting rules defined in the system prompts?

The formatting rules appear in multiple files within the `asgeirtj/system_prompts_leaks` repository. Specifically, you can find them in [`Anthropic/old/claude-opus-4.5.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-opus-4.5.md) at lines 107-110, [`Anthropic/old/claude-4.5-sonnet.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.5-sonnet.md) at lines 44-46, and [`Anthropic/old/claude-4.1-opus-thinking.md`](https://github.com/asgeirtj/system_prompts_leaks/blob/main/Anthropic/old/claude-4.1-opus-thinking.md) at lines 96-100.

### Does Claude show the raw XML tags to users when referencing past conversations?

No. Claude never exposes the raw `<chat uri="..." url="..." updated_at="...">` XML structure to end users. The system prompt instructions explicitly require Claude to parse these internal tags and present only the formatted `https://claude.ai/chat/{uri}` link alongside a natural language summary of the conversation content.

### Can I use the same chat link format in my own applications?

Yes. The URL format `https://claude.ai/chat/{uri}` is a public-facing pattern that resolves to the Claude web application. If you have access to conversation URIs through Claude's API or export features, you can construct these links using the simple concatenation pattern shown in the JavaScript example above.