From 3de24d293397ecfbc0c731c16af11870d872ca19 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 15 Oct 2026 22:16:58 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20keep=20interrupting=20a=20w?= =?UTF-8?q?orker=20that=20asks=20the=20human=20for=20a=20higher=20rung,=20?= =?UTF-8?q?and=20tell=20it=20past=20the=20cap=20to=20ask?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/loop_claude/cycle/judge.py | 4 ++-- bin/loop_claude/cycle/prompts.py | 2 +- bin/loop_claude/test_loop_claude.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/loop_claude/cycle/judge.py b/bin/loop_claude/cycle/judge.py index 6ebd83cd..8478d515 100644 --- a/bin/loop_claude/cycle/judge.py +++ b/bin/loop_claude/cycle/judge.py @@ -30,8 +30,8 @@ JUDGE_RULES = ( "- it chose between alternatives that neither README.md nor the records discriminate " "between - neither rules the rejected one out - and the choice materially changes the deliverable\n" "interrupt=false otherwise. Bookkeeping the agent settled silently - what to document, wording, " - "where a note goes - is not on its own a reason to interrupt, nor is a run ending with a request for a higher rung, " - "which is for loop-claude. The human may have replied inside the transcript, on a [human] line: judge only what " + "where a note goes - is not on its own a reason to interrupt, nor is a run ending with a request to loop-claude " + "for a higher rung; a request for the human's yes to one still interrupts. The human may have replied inside the transcript, on a [human] line: judge only what " "is still open, never a question they already answered there. A [loop] line is what loop-claude told " "the agent, such as an answer quoted from README.md or the records.\n\n" "Where the agent asked or flagged something itself, the question is that one, in the agent's own " diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index eebb3ba2..40a9b9b7 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -45,7 +45,7 @@ def escalation(route: Route, anchor: Rung | None) -> str: marked = f" Open the subagent's prompt with `{ESCALATION_MARKER} :`, n the trigger's number." rungs = [f"`{rung.agent_args()}`" for rung in escalation_rungs(anchor, route)] if not rungs: - return f" An escalation trigger in `~/.claude/CLAUDE.md` lets you hand the hard part of a task to a subagent with the Agent tool set to `{climbed(route.rung, 1).agent_args()}`, one rung above yours, only once the human agrees.{marked}" + return f" An escalation trigger in `~/.claude/CLAUDE.md` lets you hand the hard part of a task to a subagent with the Agent tool set to `{climbed(route.rung, 1).agent_args()}`, one rung above yours, only once the human agrees: loop-claude resumes you no higher on a trigger, so ask the human for that yes.{marked}" further = f", and on each further trigger one rung higher, up to {rungs[-1]}" if len(rungs) > 1 else "" resumed_higher = f" Where the hard part is the rest of the chunk, end your run instead, asking for a higher rung and naming a trigger that fired since your last such request: once the judge finds it in your transcript, the next cycle resumes you one rung up, up to {rungs[-1]}." return f" When an escalation trigger in `~/.claude/CLAUDE.md` fires, hand the hard part of the task to a subagent with the Agent tool set to {rungs[0]}, one rung above yours{further}; above that, ask the human first.{marked}{resumed_higher}" diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 18e4afeb..d629c8d5 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -672,7 +672,7 @@ class WorkerArgs(unittest.TestCase): fresh = prompts.fresh("Do it.", "## Goals", Route(opus, 3, 9), opus) self.assertIn("whether or not it is item 3. When an escalation trigger in `~/.claude/CLAUDE.md` fires, hand the hard part of the task to a subagent with the Agent tool set to `model opus, effort high`, one rung above yours, and on each further trigger one rung higher, up to `model opus, effort xhigh`; above that, ask the human first. Open the subagent's prompt with `Escalation trigger :`, n the trigger's number.", fresh) self.assertIn(" When an escalation trigger in `~/.claude/CLAUDE.md` fires, hand the hard part of the task to a subagent with the Agent tool set to `model opus, effort xhigh`, one rung above yours; above that, ask the human first. Open the subagent's prompt with `Escalation trigger :`, n the trigger's number.", prompts.resumed("", Route(Rung("claude-opus-5-5", "high"), 3, 9), opus)) - self.assertIn(" An escalation trigger in `~/.claude/CLAUDE.md` lets you hand the hard part of a task to a subagent with the Agent tool set to `model opus, effort max`, one rung above yours, only once the human agrees. Open the subagent's prompt with `Escalation trigger :`, n the trigger's number.", prompts.resumed("", Route(Rung("claude-opus-5-5", "xhigh"), 3, 9), opus)) + self.assertIn(" An escalation trigger in `~/.claude/CLAUDE.md` lets you hand the hard part of a task to a subagent with the Agent tool set to `model opus, effort max`, one rung above yours, only once the human agrees: loop-claude resumes you no higher on a trigger, so ask the human for that yes. Open the subagent's prompt with `Escalation trigger :`, n the trigger's number.", prompts.resumed("", Route(Rung("claude-opus-5-5", "xhigh"), 3, 9), opus)) self.assertNotIn("escalation", prompts.resumed("", Route(Rung("claude-fable-5-1", "max"), 3, 20), opus)) self.assertIn("hand the hard part of the task to a subagent with the Agent tool set to `model fable, effort max`, one rung above yours;", prompts.resumed("", Route(Rung("claude-opus-5-5", "max"), 3, 13), opus)) self.assertNotIn("escalation", prompts.resumed("", Route(Rung("m")), None))