Skip to content

Agent loop with structured output: handle MaxIterations/TokenLimit errors gracefully #481

Description

@korlowski

As it stands, if you use runAs[T] and the loop finishes with FinishReason.MaxIterations or FinishReason.TokenLimit, the finalAnswer, which has a type of Either[AgentParseError, T], will result in an AgentParseError. It makes no sense to attempt parsing in this case so a more graceful handling would be preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions