Start loop-claude's worker with ScheduleWakeup disallowed

This commit is contained in:
2026-10-21 22:35:39 +02:00
parent 4a4bebf87b
commit 14e323ef01
5 changed files with 10 additions and 6 deletions
+2
View File
@@ -47,6 +47,8 @@ def worker_args(session: Session, worker: Rung, prompt: str, resume: bool) -> li
*start,
"--output-format", "stream-json",
"--permission-mode", "bypassPermissions",
# A pending wakeup keeps claude -p running after the turn ends, so loop-claude never sees the worker exit and the judge never runs.
"--disallowedTools", "ScheduleWakeup",
"--verbose",
*worker.flags(),
]
+6
View File
@@ -1184,6 +1184,12 @@ class WorkerArgs(unittest.TestCase):
self.assertNotIn("--session-id", resumed)
self.assertTrue(resumed[resumed.index("-p") + 1].startswith("Continue the task; the previous run ended before the chunk was finished. The chunk is finished once"))
def test_disallows_a_wakeup_so_a_worker_that_ends_its_turn_exits(self):
opened = session.session_named("A proj loop-claude", pathlib.Path("/h/.claude/projects"))
for resume in (False, True):
args = worker.worker_args(opened, Rung("m"), "Do it.", resume=resume)
self.assertEqual(args[args.index("--disallowedTools") + 1], "ScheduleWakeup")
class Records(unittest.TestCase):
def test_heads_each_record_by_its_name_the_humans_rules_last(self):