Repository navigation
Conversation
Expose an optional SDK tool that retrieves original text from a locked snapshot of the active conversation branch, including condensed events. Keep worker execution lock-safe and cover summary, branch, persistence, and pagination behavior with real conversations and a runnable example. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
|
📁 PR Artifacts Notice This PR contains a |
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN:
AGENT:
Depends on #5555. This branch contains its history commits; the main-based diff includes them until that dependency lands. Review only the reset implementation.
Why
Long-running agents need to choose their own context handoff while retaining a way to recover omitted facts. Add an explicit
agent_resetmode: the model writes its handoff, the SDK safely commits a window switch, andconversation_historycan read the original EventLog.Summary
AgentResetCondenser,new_context(handoff=""), and once-per-window 80% reminders. Settings add both required tools without mutating the input settings; direct Agent initialization checks them. Default summarization is unchanged.Issue Number
Part of #4916; supersedes the reset portion of unpublished #5312. The old branch and experimental records are preserved.
How to Test
Validated source:
20532dd3e5fb88e75e880ce07a6afbdff98df1b3; subsequent changes are review artifacts.8ba966d1d: seven Linux-only Canvas extension fixtures on macOS, missing tmux, and missing Docker. This is not a fully green server matrix.b06_agent_reset_historycollected/imported successfully but has not run against a real model because no model credentials were configured.Detailed commands, versions, and limitations. A maintainer needs to apply
integration-test; this contributor account has no upstream label permission.Video/Screenshots
Canvas recording and verification: real Chrome + Canvas
a07364828+ this source backend, with a scripted HTTP provider. One passed workflow verifies file creation, reset, file reread, history search/read, and final visible answer. One reset, zero summary rescues; all five tool results succeeded. This demonstrates harness/UI integration, not autonomous model quality. Ancillary 404 toasts from the minimal development stack are documented.Design Doc
Self-contained reset design and overall diagram
Companion documentation: OpenHands/docs#906
Type
Notes
Following the simpler model-managed direction discussed with @enyst, the new mode omits
context_notes,HistoryIndexEvent,NotesRetrievalCondenser, storage admission/recovery, fixed head/tail retention, and additional capacity options. These were unpublished experimental additions; released defaults and compatibility surfaces remain intact.Using handoff and ordinary files instead of fixed
keep_firstand a dedicated history index is an intentional adjustment to the original issue design, still requiring maintainer acceptance. File notes do not gain note-specific version/fork semantics. One outer rescue may make multiple summarizer/provider calls under existing finite retries.Keep this draft pending real-model evaluation and current-head CI/maintainer review. Remove temporary
.pr/artifacts before merging this fork PR. No review threads or comments were posted or resolved by this implementation.