https://github.com/OpenHands/software-agent-sdk/pull/2206 - implementing ability to hard terminate the agent (even mid llm response)
would love early feedback; using acompletion from litellm but running it in a separate thread to preserve existing sync api scheme (instead of having to go async everywhere)
there is an example script that demonstrates the immediate interrupt ability
maybe cc @straight-sundown-84319
👀 1
s
straight-sundown-84319
02/25/2026, 9:13 PM
Makes sense - we introduce the async only at the agent server level
✅ 1
q
quick-window-91705
02/25/2026, 9:24 PM
Would be great if you left some context regarding the sync only api scheme: https://github.com/OpenHands/software-agent-sdk/pull/2206#pullrequestreview-3857035888
The alternative would be to have async paths for everything (besides the maintenance burden of supporting both, I think there is probably more context that Engel could benefit time)
a
ambitious-baker-8365
02/25/2026, 9:35 PM
Was having a conversation about this earlier today.
One question that kept coming up is, does the agent support rollback features when you terminate/stop? e.g. if you stop in the middle of a file_edit operation does it cancel the entire operation and brings the file back to its before-state, or is the file stuck in an in-between state
q
quick-window-91705
02/25/2026, 9:37 PM
Hmm good question
I think the answer is no? LLMs are smart enough nowadays to recover from the in-betweens state
a
ambitious-baker-8365
02/25/2026, 9:38 PM
I figured it was a no, but good to know about LLM recovery now a days - that answer is good enough for me 😆