> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Sessions

> Sessions act as a history by saving your prompt's complete state as you work. This allows you to experiment freely without fear of losing your progress.

## Create prompt sessions

* A session saves all parts of the playground state including variable values, conversation messages etc. When leaving without saving, you'll receive a prompt to save or discard changes.

* Save an ongoing session using the `save session` button in the prompt header. Unsaved sessions are marked with a red asterisk beside their name. Each saved session includes a timestamp and creator details.

<img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-prompts/save-sessions/save-session.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=2bc4ee70f8a264c1e850dacc5d9733d6" alt="Prompt header" width="1042" height="78" data-path="images/docs/evaluate/how-to/evaluate-prompts/save-sessions/save-session.png" />

* View the list of recent sessions by clicking on the arrow next to the `save session` button and see complete list using the button at the bottom of this list.

<img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-prompts/save-sessions/sessions-list.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=ab3cf30fcfadb3d32183b914cedb05a4" alt="Sessions list" width="696" height="1024" data-path="images/docs/evaluate/how-to/evaluate-prompts/save-sessions/sessions-list.png" />

* To make organization and recall easier, tag your sessions by clicking the `tag` icon that shows on hover of a session list item. Add a name that provides information to other team members about the use of that session.

<img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-prompts/save-sessions/tag-session.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=0d68e892b2f4584a436b4b844afac927" alt="Tag a session" width="1064" height="432" data-path="images/docs/evaluate/how-to/evaluate-prompts/save-sessions/tag-session.png" />

<Note>
  Save sessions quickly using Cmd+S ( Mac) or Ctrl+S (Windows/Linux).
</Note>

***

## Resolve prompt session conflicts

<Note>
  This feature is currently in beta. Please reach out to us on <a href="mailto:contact@getmaxim.ai">[contact@getmaxim.ai](mailto:contact@getmaxim.ai)</a> if you'd like to try it out.
</Note>

The conflict resolution merge feature helps you resolve conflicts when working on prompt sessions with your team. When someone else makes changes to a prompt session while you're editing it, Maxim automatically detects conflicts and guides you through resolving them.

* **Messages**: Content and attachments in conversation messages
* **Variables**: Prompt variables and their bindings
* **Model**: Selected model and provider
* **Tools**: Attached tools and agent mode settings
* **Configuration Parameters**: Model parameters like temperature, max tokens, etc.
* **Response Format**: Structured output settings

## When Conflicts Are Detected

Conflicts are automatically detected when:

1. You're editing a prompt session
2. Another user makes changes to the same prompt session
3. The sessions have conflicting changes that can't be automatically merged

## Understanding the Merge Interface

The merge interface shows conflicts in a unified view with clear visual indicators:

* **Your changes** (Current): Shown in pink/magenta - these are your current edits
* **Incoming changes**: Shown in green - these are from the latest session's changes
* **Conflict badges**: Show how many unresolved conflicts remain in each section

## Navigate to Conflict Resolution Icon

When conflicts are detected, you'll see a notification in the header, next to the title of the prompt. Click on the notification and then click on the "Resolve conflicts" button.

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/two-way-merge-dialog.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=1af35729bc1b01d78c1dd51b60897626" alt="Two way merge dialog" width="2982" height="1784" data-path="images/docs/library/two-way-merge/two-way-merge-dialog.png" />

## Review Conflicts by Section

The merge interface organizes conflicts into clear sections. Review each section to understand what has changed:

#### Messages Section

Each message in your conversation is compared. Conflicts can occur in:

* **Message content**: Different text in the same message position
* **Attachments**: Different files attached to messages

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/messages-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=89c9775b71bf2a8fa5f44158961a2282" alt="Messages conflict" width="2990" height="1698" data-path="images/docs/library/two-way-merge/messages-conflict.png" />

#### Variables Section

Variables are compared by their keys. You'll see:

* Variables that exist in both sessions with different values
* Variables that only exist in your session
* Variables that only exist in the incoming session

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/variables-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=6d92de799f2b296e465553ba8336c4a5" alt="Variables conflict" width="2978" height="1694" data-path="images/docs/library/two-way-merge/variables-conflict.png" />

#### Model Section

If different models or providers are selected, you'll see a conflict here.

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/provider-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=59697eec794a3dd4f3d55e7d17d0627b" alt="Provider conflict" width="2984" height="1704" data-path="images/docs/library/two-way-merge/provider-conflict.png" />

#### Tools Section

Conflicts in tools include:

* **Tools attached**: Different sets of tools
* **Agent mode**: Enabled/disabled state differences
* **Max tool calls**: Different limits set

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/tools-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=156950ec2891222a3e73d99bd93ac224" alt="Tools conflict" width="2988" height="1708" data-path="images/docs/library/two-way-merge/tools-conflict.png" />

#### Configuration Parameters

Model parameters like temperature, max tokens, top\_p, etc. are compared individually.

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/model-configuration-params-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=2754abbc485d81d4e302956e24bdda15" alt="Model parameters conflict" width="2994" height="1702" data-path="images/docs/library/two-way-merge/model-configuration-params-conflict.png" />

### Resolve Individual Conflicts

For each conflict, you have two options, along with the option to accept both where applicable:

**Accept Current (Your Changes)**
Keep your version of the change. Click the "Accept current" button.

**Accept Incoming (Latest Session)**
Use the version from the latest session. Click the "Accept incoming" button.

**Accept Both (When Available)**
For some conflicts (like tools or attachments), you can accept both versions. This combines elements from both sides. Click the "Accept both" button.

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/accepted-current-conflict.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=0c15611ddb97bc2a4a0bd80916da6f41" alt="Accepted current conflict" width="2980" height="1706" data-path="images/docs/library/two-way-merge/accepted-current-conflict.png" />

### Use Bulk Actions (Optional)

If you want to accept all changes from one side, use the bulk action buttons:

* **Accept all current**: Resolves all conflicts in favor of your changes
* **Accept all incoming**: Resolves all conflicts in favor of the latest session

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/accepted-all-current-changes.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=d91ea8e4e7f1182bf920cb0f9c5d481c" alt="Accepted all current changes" width="2988" height="1700" data-path="images/docs/library/two-way-merge/accepted-all-current-changes.png" />

<Note>
  After using a bulk action, you can still adjust individual conflicts. Click **"Undo"** next to the bulk action notification to revert the bulk action and resolve conflicts individually.
</Note>

### Review Resolution Status

As you resolve conflicts, watch the conflict count in each card. Each card shows how many conflicts remain.

<img src="https://mintcdn.com/maximai/Ell9gMEx7Pm4WReL/images/docs/library/two-way-merge/unresolved-conflicts.png?fit=max&auto=format&n=Ell9gMEx7Pm4WReL&q=85&s=1392034aae9ef59946ed455d3a20fe86" alt="Unresolved conflicts" width="2990" height="1704" data-path="images/docs/library/two-way-merge/unresolved-conflicts.png" />

### Complete the Merge

Once all conflicts are resolved:

1. Click on the "Merge changes" button to create the merged session
2. You'll be redirected to the new merged session

<Note>
  The merge creates a new session that combines your changes with the incoming changes based on your resolutions. Your original session and the incoming session remain unchanged. You can use the session drop down to navigate between sessions.
</Note>

## Show Unchanged Items

By default, the merge interface only shows conflicts. To see all items (including those without conflicts), check the **"Show unchanged items"** checkbox.

This is useful when you want to:

* Verify that certain items are indeed unchanged
* Get a complete view of the session comparison
* Understand the full context of changes

## Merge conflict detection on publishing a version of a prompt

When you try to publish a new version of the prompt, Maxim will check for conflicts and if any are detected, you will be asked to resolve them before publishing the version.

## Next steps

* [Create and manage prompt versions](/prompt-engineering/prompt-versions)
* [Run experiments on prompts](/offline-evals/via-ui/prompts/prompt-evals)
