Skip to content

CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.

docs(changelog): replace erroneous entry with StructuredValue serialization fix in 0.9.0

xf gongee98cc0ec554
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ac70b3..f34b3fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -129,11 +129,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
-- **`FallbackBoundModel.generate()` now triggers failover on an error
- `AssistantMessage`.** Previously `generate()` only caught stream-level
- exceptions; a provider that completed the stream but returned an
- `AssistantMessage` with `stop_reason="error"` was passed through as a
- successful result instead of attempting the next model in the chain.
+- **`StructuredValue` fields now preserve `BaseModel` payloads on
+ serialization.** Fields typed `StructuredValue` (the
+ `JsonPrimitive | BaseModel | list | dict` union used by tool-result
+ `details`, `AgentToolResult`, `HitlAnswerEvent.answer`, and compaction
+ message-ref hashing) silently serialized `BaseModel` instances to `{}`
+ on `model_dump()`. Pydantic's union dispatch picks the dump schema from
+ the declared base, not the runtime subclass, so the concrete instance's
+ fields were ignored with no error or warning — data gone. Annotating the
+ `BaseModel` branch with `SerializeAsAny[BaseModel]` fixes the silent loss
+ across all five affected sites: checkpointer save, compaction state,
+ `ToolExecutionEndEvent`, `ToolExecutionUpdateEvent`, and `HitlAnswerEvent`.
- **`SubagentMiddleware` now strips checkpointed-HITL elements from a child
agent's inherited tools / middleware.** Previously, passing the parent