Name human_needed.py for the exit-2 stops it holds

This commit was merged in pull request #126.
This commit is contained in:
2026-09-29 10:41:11 +02:00
parent f602b94aff
commit 2f9ab2fb7d
4 changed files with 8 additions and 9 deletions
+13
View File
@@ -0,0 +1,13 @@
import sys
from loop_claude.outcome import Stop
def stop(to, but):
return Stop(2, f"the human is needed to {to}, but {but}")
def off_terminal(to):
if sys.stdin.isatty() and sys.stdout.isatty():
return None
return stop(to, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")