Release Notes - v1.18.1
Bug Fixes
Agent Event Status Fix
AgentFinishedevent now correctly reportsstatus: completed(orfailed) instead ofin_progresswhen agent terminates- The status is determined based on the
StopReasonfrom continuation criteria evaluation
Duplicate Event Fix
- Fixed duplicate
ContinuationEvaluatedevents being emitted during agent execution - Removed redundant
hasNextStep()check fromStepByStep::nextStep()
AgentBuilder maxRetries Fix
AgentBuilder::withMaxRetries()now actually works - the value is passed toToolCallingDrivervia inference retry policy- Previously the property was set but never used
AbstractAgent Event Handler Fix
- Fixed
AbstractAgent::build()returning stale agent instance without the configured event handler - Event handlers and listeners set via
withEventHandler(),wiretap(),onEvent()now correctly propagate to the built agent
Static Analysis Improvements
PHPStan Level 8 Compliance
- Added callable signatures to
ContentPartsandMessageListmethods (map,reduce,filter) - Added proper Closure signatures to
MockToolandIdempotencyMiddleware - Added
@param class-stringannotations toSchemaDefinition - Fixed array type annotations in
Task,TaskList,TodoReminderProcessor - Fixed
ReActDriver::withCachedContext()parameter passing - Fixed
DeterministicAgentDriverarray key type issues - Removed redundant int casts in retry policy classes
- Added
Agent::isStateChanged()override to prevent spurious iterator yields
Psalm Compliance
- Added missing
#[\Override]attributes across codebase - Added template parameters to
IteratorAggregateimplementations - Fixed namespace issues in
ResearchSubagentTool - Added
ExecutionPolicy::default()static method