FoundationAgents/OpenManus · warning · ServerError

-32001

-32001

Error message

Unsupported operation

What it means

A JSON-RPC error (code -32001, UnsupportedOperation) raised as ServerError(UnsupportedOperationError()) by the executor's cancel() method. The A2A protocol allows clients to request task cancellation, but this executor performs no cancellation work and explicitly rejects cancel requests.

Source

Thrown at protocol/a2a/app/agent_executor.py:72

                ),
            )
        ]
        event_queue.enqueue_event(
            completed_task(
                context.task_id,
                context.context_id,
                [new_artifact(parts, f"task_{context.task_id}")],
                [context.message],
            )
        )

    def _validate_request(self, context: RequestContext) -> bool:
        return False

    async def cancel(
        self, request: RequestContext, event_queue: EventQueue
    ) -> Task | None:
        raise ServerError(error=UnsupportedOperationError())

View on GitHub (pinned to 52a13f2a57)

Solutions

  1. Do not send tasks/cancel to this agent; disable client-side cancellation/timeouts that trigger it.
  2. Check the agent card / server capabilities and skip agents that do not advertise cancellation support.
  3. If you own the executor and need cancellation, implement cancel() to signal the running agent (e.g. a cancellation event) instead of raising.
  4. On the client, catch the -32001 error and treat it as 'cancel not supported' rather than a fatal failure.

Example fix

# before
async def cancel(self, request, event_queue):
    raise ServerError(error=UnsupportedOperationError())  # always fails
# after (client side)
try:
    await client.send_message(cancel_request)
except ServerError as e:
    if e.error.code == -32001:  # UnsupportedOperation
        pass  # server cannot cancel; abandon the task locally instead
Defensive patterns

Strategy: try-catch

Try / catch

try:
    await client.cancel_task(task_id)
except ServerError as e:
    if e.error and e.error.code == -32001:  # UnsupportedOperation
        pass  # cancellation not supported; abandon the task locally
    else:
        raise

Prevention

When it happens

Trigger: An A2A client sending a tasks/cancel request for a task handled by this executor; or client code calling executor.cancel(...) directly. Any cancel path hits the unconditional raise — there is no state check, so even completed tasks cannot be 'cancelled'.

Common situations: Generic A2A client SDKs that automatically issue cancel on timeout or user abort; orchestration layers that cancel all in-flight tasks during shutdown; test harnesses probing protocol conformance across all methods.

Related errors


AI-assisted analysis of FoundationAgents/OpenManus@52a13f2a57 (2026-08-15). Data as JSON: /api/errors/10242e8a0e6f591d. Report an issue: GitHub.