mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-07 22:10:57 +08:00
A user-approved terminal/execute_code command could be SIGINT-killed (exit 130 + "[Command interrupted]") by a stale interrupt bit that landed on the execution thread during the blocking approval-wait, while the result still carried the "...approved by the user." note. The terminal tool runs sequentially inline on the execution thread, and nothing cleared or re-checked the bit between approval-grant and env.execute. Clear the current thread's interrupt bit once before an approved command spawns its child (terminal foreground; execute_code local + remote), and enrich the note to "...approved by the user, then interrupted." on a genuine post-start interrupt instead of implying success. A genuine interrupt arriving after execution starts (or during a retry backoff) still SIGINTs the command; non-approved commands keep current behavior. Adds regression tests covering stale-bit-clears, genuine-interrupt-still- kills, the retry-backoff window, natural-exit-130 (not mislabeled), and execute_code local + remote.
77 KiB
77 KiB