Skip to content

Always create fresh condenser with current defaults on load - #263

Merged
xingyaoww merged 4 commits into
mainfrom
openhands/test-condensation-fix
Dec 29, 2025
Merged

xingyaoww merged 4 commits into
mainfrom
openhands/test-condensation-fix

Conversation

@xingyaoww

@xingyaoww xingyaoww commented Dec 28, 2025 •

Copy link
Copy Markdown
Contributor

Summary

This PR ensures existing users get the latest condenser settings (e.g., max_size, keep_first) without needing to reconfigure. Previously, condenser settings were loaded from agent_settings.json which meant users would keep using old defaults even after SDK updates.

Changes

  • Modified agent_store.py to always create a fresh LLMSummarizingCondenser with current SDK defaults when loading agent settings, rather than preserving the old condenser configuration

Testing

This change ensures users automatically benefit from improved condenser defaults in new SDK versions.


🚀 Try this PR

uvx --python 3.12 git+https://github.com/OpenHands/OpenHands-CLI.git@openhands/test-condensation-fix

Testing the short-term fix for issue #1518 where condensation fails
when a tool loop spans almost the entire view.

Uses commit d6233c9e6c174533de912d4bcda2edb83f4d1e27 from
openhands/fix-condensation-defaults branch.

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

github-actions Bot commented Dec 28, 2025 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands_cli/stores
   agent_store.py501472%67, 83, 109–112, 115, 139, 141, 148, 155, 157, 165, 167
TOTAL371275379% 

This ensures existing users get the latest condenser settings
(e.g., max_size, keep_first) without needing to reconfigure.
Previously, condenser settings were loaded from agent_settings.json
which meant users would keep using old defaults even after SDK updates.

Co-authored-by: openhands <openhands@all-hands.dev>
Comment thread openhands_cli/stores/agent_store.py Resolved
@xingyaoww
xingyaoww force-pushed the openhands/test-condensation-fix branch from cc96544 to e3f0550 Compare December 29, 2025 17:40
@openhands-ai

openhands-ai Bot commented Dec 29, 2025

Copy link
Copy Markdown

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Check Package Versions

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #263 at branch `openhands/test-condensation-fix`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@xingyaoww xingyaoww closed this Dec 29, 2025
@xingyaoww xingyaoww reopened this Dec 29, 2025
@xingyaoww

Copy link
Copy Markdown
Contributor Author

@OpenHands please revert to 7a9085b and undo the changes to pyproject.toml in this PR

@openhands-ai

openhands-ai Bot commented Dec 29, 2025

Copy link
Copy Markdown

I'm on it! xingyaoww can track my progress at all-hands.dev

This reverts the SDK version changes, going back to using the released
versions (1.7.2) from PyPI instead of the git commit.

Co-authored-by: openhands <openhands@all-hands.dev>
@xingyaoww
xingyaoww force-pushed the openhands/test-condensation-fix branch from e3f0550 to 4452b97 Compare December 29, 2025 21:10
@openhands-ai

openhands-ai Bot commented Dec 29, 2025

Copy link
Copy Markdown

Done! I've completed the requested changes:

  1. Reverted to commit 7a9085b - Reset the branch to the specified commit, which undid the changes from commit e3f0550 ("Bump SDK and improve condenser settings handling")

  2. Reverted pyproject.toml to main - Restored pyproject.toml to match the main branch, which:

    • Changed SDK versions back to openhands-sdk==1.7.2 and openhands-tools==1.7.2 (released PyPI versions)
    • Commented out the [tool.uv.sources] section that was pointing to a specific git commit
  3. Updated uv.lock - Regenerated the lock file to match the reverted pyproject.toml

The changes have been pushed to the openhands/test-condensation-fix branch. The PR now contains only the code changes from commits 481c96e and 7a9085b (the condenser-related improvements), without the SDK version bump to the git commit.

View full conversation

@xingyaoww
xingyaoww marked this pull request as ready for review December 29, 2025 21:11
@xingyaoww
xingyaoww requested a review from malhotra5 December 29, 2025 21:11
@xingyaoww xingyaoww changed the title DRAFT: Bump SDK to test condensation fix (PR #1523) DRAFT: Always create fresh condenser with current defaults on load Dec 29, 2025
@xingyaoww xingyaoww changed the title DRAFT: Always create fresh condenser with current defaults on load Always create fresh condenser with current defaults on load Dec 29, 2025

@malhotra5 malhotra5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

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