Skip to content

Conversation

zkpepe
Copy link

@zkpepe zkpepe commented Mar 26, 2025

Fixed an issue in run_society_with_strict_limit where result[1].msgs could cause errors if the structure wasn't as expected. Now the checks are more robust, ensuring safe access to msgs.

# Force a TASK_DONE in the user response to trigger termination
result = original_step(*args, **kwargs)
if len(result) >= 2 and hasattr(result[1], 'msgs') and result[1].msgs and len(result[1].msgs) > 0:
if len(result) >= 2 and hasattr(result[1], 'msgs') and result[1].msgs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @zkpepe for the PR, I don't understand why we remove len(result[1].msgs) > 0 check here and how could it improve

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Satisfies both conditions len(result) >= 2 and hasattr(result[1], 'msgs'), will not be an empty list

LJPearson176 pushed a commit to LJPearson176/hyperion that referenced this pull request Aug 7, 2025
Bumps [anthropic](https://github.com/anthropics/anthropic-sdk-python) from 0.49.0 to 0.50.0.
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](anthropics/anthropic-sdk-python@v0.49.0...v0.50.0)

---
updated-dependencies:
- dependency-name: anthropic
  dependency-version: 0.50.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants