Class A2ATaskInterruptedException

All Implemented Interfaces:
Serializable

public class A2ATaskInterruptedException extends LangChain4jException
Thrown when an A2A task enters an interrupted state (input-required or auth-required) instead of completing.

The remote agent has paused the task and is waiting for additional input or authentication before it can continue. The A2A server will not advance the task on its own, so the CompletableFuture backing the invocation is completed exceptionally with this exception rather than left pending indefinitely.

Since:
1.19.0
See Also:
  • Constructor Details

    • A2ATaskInterruptedException

      public A2ATaskInterruptedException(String taskId, org.a2aproject.sdk.spec.TaskState state, String reason)
  • Method Details

    • taskId

      public String taskId()
      The id of the task that was interrupted.
      Since:
      1.19.0
    • state

      public org.a2aproject.sdk.spec.TaskState state()
      The interrupted state the task is in, either TASK_STATE_INPUT_REQUIRED or TASK_STATE_AUTH_REQUIRED.
      Since:
      1.19.0
    • reason

      public String reason()
      The status message sent by the remote agent when it interrupted the task — typically the question asking for the missing input, or the authentication challenge. Returns null when the remote agent interrupted the task without sending one; the generic description used in Throwable.getMessage() in that case is not reported here, so callers can tell the two apart.
      Since:
      1.19.0