Say why a leading < marks Claude Code's entry and why a trust failure only warns

This commit was merged in pull request #137.
This commit is contained in:
2026-09-29 12:08:50 +02:00
parent fa49aacbd4
commit d38b354538
3 changed files with 2 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@ def written_by_human(entry):
# {"type": "user", "message": {"content": "<command-name>/model</command-name>\n..."}}
# {"type": "user", "promptSource": "system", "message": {"content": "<task-notification>..."}}
# {"type": "user", "promptSource": "typed", "message": {"content": "merge it"}}
# Claude Code tags what it injects, and an entry without promptSource carries no other mark, so a leading < is its own.
if isinstance(text := content(entry), str):
source = entry.get("promptSource")
return source != "system" and (source == "typed" or not text.startswith("<"))
+1
View File
@@ -6,6 +6,7 @@ from loop_claude.file_writes import replace_json
from loop_claude.outcome import Failure
# A failure only warns: the interrupt still runs, and the human answers Claude Code's trust dialog.
def trust(config, roots):
try:
with open(config, encoding="utf-8") as handle: