diff --git a/bin/loop-claude b/bin/loop-claude index b17d9109..380e43f3 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -410,14 +410,17 @@ def human_turns(entries): def typed(entry): - """A human turn: a "user" entry, not isMeta, not promptSource "sdk" (the loop's own prompts), whose message.content is a string not starting with "<" ( and its kind) or one or more text parts, none starting with "[Request interrupted".""" - if entry.get("type") != "user" or entry.get("isMeta") or entry.get("promptSource") == "sdk": + if entry.get("type") != "user": return False content = entry.get("message", {}).get("content") - if isinstance(content, str): - return not content.startswith("<") parts = content if isinstance(content, list) else [] - return bool(parts) and all(isinstance(part, dict) and part.get("type") == "text" and not part.get("text", "").startswith("[Request interrupted") for part in parts) + meta = entry.get("isMeta") + loop_prompt = entry.get("promptSource") == "sdk" + command = isinstance(content, str) and content.startswith("<") + no_content = not isinstance(content, str) and not parts + non_text = any(not isinstance(part, dict) or part.get("type") != "text" for part in parts) + interruption = not non_text and any(part.get("text", "").startswith("[Request interrupted") for part in parts) + return not (meta or loop_prompt or command or no_content or non_text or interruption) # "assistant" entries and stream-json diff --git a/todo.md b/todo.md index 85571314..5de406fd 100644 --- a/todo.md +++ b/todo.md @@ -4,10 +4,6 @@ Ships when a four-seat scoring run puts every dimension and the overall at 7.0 or above (`docs/decisions.md`). Ordered by the dimension each item lifts, lowest first, per the 2026-09-26 panel; each is one chunk. -Locality, 6.25: - -- Name each clause of `typed` for the entry kind it drops, so one edit cannot silently change what both `human_turns` and `render` see. - Self-sufficiency, 6.75: - Record in `docs/decisions.md` why every worktree of the checkout is trusted before an interrupt.