-
Notifications
You must be signed in to change notification settings - Fork 95
Yield to user on content-only replies: set IDLE and break run() #1385
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
Draft
enyst
wants to merge
8
commits into
fix-premature-conversation-termination-clean
Choose a base branch
from
feature/idle-on-content-break
base: fix-premature-conversation-termination-clean
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Yield to user on content-only replies: set IDLE and break run() #1385
enyst
wants to merge
8
commits into
fix-premature-conversation-termination-clean
from
feature/idle-on-content-break
Conversation
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
- Set execution_status=IDLE in Agent.step() when LLM returns content without tool calls - Break run() loop on IDLE in LocalConversation - Update tests to expect IDLE (instead of FINISHED) for content-only turns Co-authored-by: openhands <openhands@all-hands.dev>
- confirmation_mode: message-only and confirm-path now expect IDLE - pause_functionality: finished assertions updated to IDLE for content-only Co-authored-by: openhands <openhands@all-hands.dev>
- Add _new_user_message flag to LocalConversation - send_message() sets the flag; run() clears it per-iteration - Break on IDLE only if no new user message arrived; never break on FINISHED - Preserves race fix for TestMessageWhileFinishing while yielding IDLE on content-only Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
Coverage Report •
|
||||||||||||||||||||||||||||||
- confirmation_mode: append finish branch after message-only scenarios - pause_functionality: append finish branch after content-only scenarios - agent_status_transition: re-add LLM call-count assertion when already finished Co-authored-by: openhands <openhands@all-hands.dev>
- confirmation_mode: combine message-only then finish via side_effect - validate finish ActionEvent and ObservationEvent, and no pending actions Co-authored-by: openhands <openhands@all-hands.dev>
…ith call-counts - Remove duplicate IDLE assert - First turn: content-only -> IDLE - Second turn: finish -> FINISHED; assert LLM call counts Co-authored-by: openhands <openhands@all-hands.dev>
…guarded promotion - Do not promote IDLE->RUNNING when no new user message - Let run() always enter try/finally for proper span/end and error wrapping Co-authored-by: openhands <openhands@all-hands.dev>
enyst
commented
Dec 12, 2025
openhands-sdk/openhands/sdk/conversation/impl/local_conversation.py
Outdated
Show resolved
Hide resolved
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
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.
Summary
When the LLM returns a content-only assistant message (no tool calls), yield control back to the user instead of marking the conversation finished or continuing the loop.
Changes
Rationale
Notes
Co-authored-by: openhands openhands@all-hands.dev
@enyst can click here to continue refining the PR