Repository navigation
Conversation
Author
|
Rebased onto current
Related: #84207 · pairs with Codename-11/hermes-relay#634 (phone display). |
ophirhan
force-pushed
the
fix/interrupt-reason-user-visible-main
branch
from
October 18, 2026 06:41
2f5f8e1 to
84f748c
Compare
ophirhan
force-pushed
the
fix/interrupt-reason-user-visible-main
branch
from
October 18, 2026 07:56
84f748c to
a232236
Compare
Author
|
Rebased onto current |
Empty interrupted turns (hard stop, timeout, client-gone) no longer settle as silence or bare "Operation interrupted." Host fills a reasoned final line; gateway/API/TUI complete payloads carry error+text; Desktop paints a non-retryable stop notice instead of a blank chat. System lifecycle stops pass distinct tool_reason so they are not mislabeled as user Stop. Related: NousResearch#84207, Codename-11/hermes-relay#634
ophirhan
force-pushed
the
fix/interrupt-reason-user-visible-main
branch
from
October 19, 2026 16:56
a232236 to
1c0941b
Compare
This branch has not been deployed
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.
Summary
Interrupted turns that ended with empty final text (hard stop, tool timeout, client-gone, lease takeover) could settle as a blank chat: no reason line,
error_retained=False, and Desktop skipped the no-reply card for interrupted turns.This PR always produces a user-visible stop reason on empty interrupts and carries it through host → gateway/API/TUI → Desktop.
Changes
format_interrupt_user_text/ensure_interrupt_final_response— never emit bareOperation interrupted.; prefer tool_reason, exit reason, or session-id pointer into agent.logfinal_response(anderror) before persist on interrupted turnsmessage.completealways setserror+ non-emptytext; system lifecycle stops pass distincttool_reason(not mislabeled user Stop)message.completefalls back toerrorwhen text is emptyRelated
Test plan
./scripts/run_tests.sh tests/agent/test_format_interrupt_user_text.py./scripts/run_tests.sh tests/agent/test_close_interrupted_tool_sequence.pytest_interrupt_dead_compute_host, hook, background review, does_not_wait)session-states-interrupted-settle.test.ts(CI)Operation interrupted: …not blank