fix(stop): an unconfirmed /exit no longer claims a kill-chain fallback (Issue #60, Linux item 2)
An agent that exits on /exit never turns `working`, so send_keys_safe returns 4 although the stop then ends cleanly. The line now says the delivery is unconfirmed and that the stop waits for the session to exit; the kill steps keep their own lines, printed only when they run. Exit judgement and the kill chain are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
614ab1420f
commit
463817ee34
2 files changed
+65
-1
No files matched your search
@@ -239,7 +239,7 @@ graceful_stop() {
|
||||
if [ "$exitkey" = "Ctrl+C" ] || [ "$exitkey" = "C-c" ]; then
|
||||
herdr send-keys -t "$SESSION_NAME" C-c 2>/dev/null || true
|
||||
else
|
||||
send_keys_safe "$SESSION_NAME" "$exitkey" "stop$$" || echo "graceful: safe delivery failed (rc=$?) — falling back to kill chain"
|
||||
send_keys_safe "$SESSION_NAME" "$exitkey" "stop$$" || echo "graceful: delivery of '$exitkey' unconfirmed (rc=$?) — waiting for the session to exit"
|
||||
fi
|
||||
_wait_session_gone "$SESSION_NAME" 5 || true
|
||||
if ! herdr has-session -t "$SESSION_NAME" 2>/dev/null; then
|
||||
|
||||
Reference in new issue
Block a user