Skip to content

Fix truncation state persistence bug #7212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Mar 12, 2025

This PR proposes a fix for the controller truncation, and a detailed test on multiple session reloads and truncations.


(openhands)
This PR fixes a bug with truncation state persistence. The start_id was being incorrectly set to truncation_id after _init_history(), causing session reloading to not work correctly.

Changes:

  • Store original_start_id at beginning of _init_history() and restore it at end instead of overwriting with truncation_id
  • Add comprehensive test for truncation state persistence

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:099c240-nikolaik   --name openhands-app-099c240   docker.all-hands.dev/all-hands-ai/openhands:099c240

@enyst enyst force-pushed the fix-truncation-state-persistence branch from ef97cc0 to 099c240 Compare March 20, 2025 21:55
@enyst enyst mentioned this pull request Mar 20, 2025
1 task
@enyst enyst closed this Mar 31, 2025
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.

2 participants