Skip to content

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

@ad-eg-dk

Description

@ad-eg-dk

/// A task that represents the asynchronous retrieval operation.
/// The task result contains the serialized session state, or <see langword="null"/> if not found.
/// </returns>
public abstract ValueTask<AgentSession> GetSessionAsync(
AIAgent agent,
string conversationId,
CancellationToken cancellationToken = default);

Judging by 1) existing implementations (noop session store, in memory session store), 2) use by AIHostAgent, 3) and the nullability contract, the description should say that a new session must be returned if not found, and that null should not be returned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions