Skip to content

Add ADR to decide consistency of Chat History Persistence#4816

Open
westey-m wants to merge 2 commits intomicrosoft:mainfrom
westey-m:chat-history-persistence-consistency-adr
Open

Add ADR to decide consistency of Chat History Persistence#4816
westey-m wants to merge 2 commits intomicrosoft:mainfrom
westey-m:chat-history-persistence-consistency-adr

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

When using an AIAgent today, users get different behaviors based on whether chat history is stored service side or in a ChatHistoryProvider. This can create challenges when e.g. the function call loop is terminated and you want to resume, but you don't now whether the last FunctionResultContent is in the chat history or not.

Description

  • Adding an ADR walking through the options to improve consistency

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings March 20, 2026 14:10
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Mar 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a proposed ADR documenting the current inconsistency between service-side chat history storage and framework ChatHistoryProvider storage when tool-calling loops are involved, and frames decision drivers/options for aligning behavior.

Changes:

  • Introduces ADR 0020 describing the discrepancy (persistence timing + trailing FunctionResultContent) between service-managed and provider-managed history.
  • Documents two default behavior options (per-run w/ trimming vs per-service-call persistence) with pros/cons and links to related PRs/issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants