Skip to content

[FEATURE] Protect parallel invocations to the same Agent instance #1176

@liatius

Description

@liatius

Problem Statement

Currently, if an invocation occurs while another one is being processed, the internal global state of the agent becomes corrupted, causing not only the concurrent invocations to fail, but also any subsequent invocations to fail.

A common scenario affected by this behavior is when a retry occurs due to client timeout, which triggers another invocation with the same session ID while the previous request is still being processed.

Proposed Solution

Throw a concurrency exception instead of handling the request and corrupting the agent's state, which causes all subsequent calls to fail.

Use Case

This is most impactful retries retries, but also a general protection for the agent's state.

Alternatives Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions