Load no MCP server in a headless claude call that is denied tools
CI / tests (pull_request) Successful in 3m45s

This commit is contained in:
Lilleman
2026-11-20 17:15:42 +01:00
parent 00b87e3fb9
commit 700ac3e2ce
12 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ class StuckWorkers(unittest.TestCase):
streamed, fake, said, _, record = self.worker_with(ASSISTANT, None, None, None, held=[shell()], replies=[verdict()])
[(args, prompt)] = fake.made("claude")
self.assertEqual(args[args.index("--model") + 1 :][:3], ["claude-opus-5-5", "--effort", "medium"])
self.assertEqual(args[args.index("--tools") + 1], "")
self.assertEqual(args[args.index("--tools") + 1 :][:2], ["", "--strict-mcp-config"])
self.assertEqual(json.loads(args[args.index("--json-schema") + 1])["properties"]["verdict"]["enum"], ["working", "waiting on a person", "stuck"])
self.assertTrue(prompt.endswith("\n\nShell 7: bin/run-tests\nIts processes, as pid, state, CPU and command line:\n8 S 2.0 s python3 -m pytest\n9 S 0.0 s sh -c trap '' INT; sleep 999\nThe end of its output:\ncollected 40 items"))
line = "stuck check: a headless claude judged the worker stuck, naming process 8 (python3 -m pytest): pytest waits on a shell that ignores SIGINT" + sign(1600, 1600)