Skip to content

.NET: fix GetSessionAsync doc comment incorrectly stating null is returned (fixes #6082)#6191

Open
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:fix-6082-sessionstore-doc
Open

.NET: fix GetSessionAsync doc comment incorrectly stating null is returned (fixes #6082)#6191
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:fix-6082-sessionstore-doc

Conversation

@hanhan761
Copy link
Copy Markdown

Summary

The XML doc comment on AgentSessionStore.GetSessionAsync() states that the method returns
ull when the session is not found. However, the return type is ValueTask (non-nullable), and both existing implementations (noop session store, in memory session store) as well as the usage by AIHostAgent expect a new session to be returned instead of null.

This fix corrects the documentation to match the actual contract.

Issue

Fixes #6082

Verification

  • Compared with the identical type in Microsoft.Agents.AI.Foundry.Hosting which already has the correct wording: "…or a new session if not found."
  • The change is purely a documentation comment fix; no runtime behavior is affected.

Copilot AI review requested due to automatic review settings May 30, 2026 07:05
@moonbox3 moonbox3 added the .NET label May 30, 2026
@hanhan761 hanhan761 force-pushed the fix-6082-sessionstore-doc branch from a614855 to 7c0d5c7 Compare May 30, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Incorrect description on AgentSessionStore.GetSessionAsync regarding "returning null if not found"

2 participants