Answer the architect's first round

This commit is contained in:
2026-10-01 23:19:10 +02:00
parent f385b563f0
commit 00446be689
12 changed files with 188 additions and 150 deletions
+2 -6
View File
@@ -20,14 +20,10 @@ def interrupt(root, session_id, model, path, question, paths, effects: Effects)
return Stop(1, entries.reason)
before = human_turns(entries)
try:
effects.run(["claude", "--model", model, "--permission-mode", "bypassPermissions", "--resume", str(session_id)], cwd=root)
effects.claude_on_terminal(["--model", model, "--permission-mode", "bypassPermissions", "--resume", str(session_id)], root)
except OSError as failure:
return Stop(1, f"could not start claude for the interrupt: {failure.strerror}")
entries = read(path)
if isinstance(entries, Failure):
return Stop(1, f"could not tell whether you typed anything: {entries.reason}")
return None if typed_since(before, entries) else human_needed.stop(TO, "the interrupt ended with nothing typed")
def typed_since(turns_before, entries) -> bool:
return human_turns(entries) > turns_before
return None if human_turns(entries) > before else human_needed.stop(TO, "the interrupt ended with nothing typed")