sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

[FEATURE] Protect parallel invocations to the same Agent instance

Open liatius opened this issue 5 months ago • 0 comments

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

liatius avatar Nov 13 '25 12:11 liatius