You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dogfooded against a real 15MB transcript with 70 Agent tool_use dispatches: task_count only
ever matched "Task" (this build's SDK names the dispatch tool "Agent"), so the delegation
mandate reported "zero subagents" over 70 real ones, and the Task-gated agent-naming mandate
was structurally unable to ever fire. Now counts Task or Agent (not TaskCreate, confirmed to
be a todo-tracker item shape, not a dispatch call).
The Bash-write extraction added in v1.36.0 was over-matching by an order of magnitude:
unexpanded $VAR redirect targets (fixture literals, never real files) and write-shaped lines
inside inert heredoc bodies (`cat > script.sh <<EOF ... EOF`, where body lines describing a
write are the generated file's content, not this command's own action) were both counted as
real writes, measured at 53 directories / 83 extensions for a session that wrote one real
file. emit() now drops any $-containing candidate, and heredoc bodies are skipped only when
the same line already matched a write rule (line_had_write) -- which is what keeps an
executed `python3 - <<PY` heredoc's real open(...,'w') write from being suppressed too,
the regression the first pass of this fix introduced and PROOF 5 caught.
tests/test-breadth-mandate.sh: PROOF 10 (Agent dispatch suppresses the breadth mandate),
PROOF 11 (zero Task AND zero Agent still trips it), PROOF 12 ($VAR-containing Bash write
target is not counted). All 12 proofs pass; falsified by hand against the pre-fix hook
(146a395), restored byte-identical (sha256 68fa3e69...).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
multi-directory work -- touched $dir_count directories with $ext_count file types, zero subagents (try /team, or TaskCreate: code-reviewer, qa, worker, planner, test-writer)"
370
+
multi-directory work -- touched $dir_count directories with $ext_count file types, zero subagents (try /team, or dispatch one directly: code-reviewer, qa, worker, planner, test-writer)"
269
371
fi
270
372
271
373
# Prove it works: a completion claim closing this turn with zero evidence produced in it.
@@ -304,7 +406,7 @@ fi
304
406
# a completion claim is conversational, not a claim about code, and the false-block
305
407
# cost of guessing otherwise is worse than the miss (see the false-positive note by
306
408
# the pattern list below).
307
-
# silent -- ANY Bash, Read, or Task tool_use anywhere in the turn, in any order relative to
409
+
# silent -- ANY Bash, Read, or Task/Agent tool_use anywhere in the turn, in any order relative to
308
410
# the edit. This is deliberately generous in both directions: a Bash call is treated
309
411
# as evidence whether or not it happens to be a test invocation, and a Read is
310
412
# treated as evidence even if it came before the edit (i.e. was investigation of the
@@ -320,7 +422,7 @@ fi
320
422
# Known false-positive shape, disclosed rather than chased: a turn that Writes a genuinely
321
423
# unverifiable artifact -- a poem, a note, a scratch file with no "works" to check -- and closes
322
424
# with a plain "Done." trips this exactly like an unverified code fix would, because file-write
323
-
# plus closing "done" plus no Bash/Read/Task in the same turn is indistinguishable from here.
425
+
# plus closing "done" plus no Bash/Read/Task/Agent in the same turn is indistinguishable from here.
324
426
# Scoping the edit check to code-like extensions was considered and rejected: it would have
325
427
# meant maintaining an extension allowlist this hook has no way to keep current, trading one
326
428
# false-positive shape for a false-negative one (a `.sh` fix that never runs is exactly the case
0 commit comments