Skip to content

Python: [Bug]: Workflow checkpointing fails on A2A protobuf raw representations #8022

Description

Problem

Workflow checkpoint creation can fail when A2A responses are present in workflow state. A2A Part instances are stored in framework objects through raw_representation, but the generated protobuf type reports its module as a2a_pb2, which is not importable by Python pickle in the installed A2A SDK layout.

This produces warnings such as:

Failed to create checkpoint at iteration 6: Can't pickle <class 'a2a_pb2.Part'>: No module named 'a2a_pb2'

The workflow continues running, but the affected checkpoint is not persisted.

Expected behavior

Runtime-only provider representations should not prevent the framework content, workflow state, and executor state from being checkpointed.

Scope

The fix should preserve raw_representation during the active run while excluding it from durable pickle state and restoring it as None after checkpoint restoration. Framework-native content fields such as text, URI, data, tool calls, and workflow state must remain intact.

Reproduction

Use an A2A Part as the raw_representation of framework Content or Message, then serialize a checkpoint containing that object. Pickling fails because a2a_pb2.Part cannot be imported during serialization.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonUsage: [Issues, PRs], Target: Python

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions