Skip to content

feat(agents): deny six unused tools for Harden, Polish and Research - #779

Merged
dean0x merged 8 commits into
mainfrom
feat/778-worker-agents-deny-unused-tools
Nov 10, 2026
Merged

dean0x merged 8 commits into
mainfrom
feat/778-worker-agents-deny-unused-tools

Conversation

@dean0x

@dean0x dean0x commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Harden, Polish and Research never use six tools: Monitor, TaskStop, Workflow, Artifact, ListAgents and ReportFindings. Each agent start pays tokens for every tool in its list. This change adds the six names to the disallowedTools list of these three agents. Code, Fix and Refactor already have them (#775).

Changes

  • Harden, Polish and Research deny the six tools, as Code, Fix and Refactor do. All six deny-list agents now share one deny set.
  • The six names join the one shared deny list in the test fixture (23 names). The Code-only list is removed.
  • A new check fails when an agent with a tools: list grants any name on the shared deny list.
  • The agent files change in the frontmatter only. Five size ceilings rise by 85 bytes each, for the six new lines.
Ceiling Old New
research 5,133 5,218
research, curation off 4,773 4,858
harden 4,806 4,891
harden, curation off 4,238 4,323
polish 4,495 4,580

Token Effect

Testing

  • Validate: PASS at 99cdbbf (408 test files; 19,216 passed; 8 skipped).
  • Test plan TP-1 to TP-8: PASS at 99cdbbf.

Known Limits

  • The Harden figure comes from one headless pair. Spawn-to-spawn noise is accepted.
  • The Polish and Research token effect is not measured.
  • Skills that load on demand are outside the agent body size test.
  • In a spawned agent, a Bash run that passes its time limit moves to the background. Harden has no wait rule for that case.

Breaking Changes

None expected.

Related Issues

Closes #778

Harden, Polish and Research start with six tools that none of their paths
use. Each start uses tokens for these tools. They now deny Monitor,
TaskStop, Workflow, Artifact, ListAgents and ReportFindings, as Code, Fix
and Refactor do.

- The six names join SHARED_DENYLIST (17 to 23 names). The Code-only extra
  list is gone. Code, Fix, Refactor and Research deny exactly the list.
  Harden and Polish add Skill and mcp__*.
- The guard loops over every deny-list row and every shared name for the
  row, body and pin probes. A new check reports an allowlist agent that
  grants any shared deny name, with its own known-bad probe.
- Five size ceilings rise by 85 bytes each: frontmatter deny lines only,
  no body text. research 5133 to 5218, research (curation off) 4773 to
  4858, harden 4806 to 4891, harden (curation off) 4238 to 4323, polish
  4495 to 4580. The size guard header states the either-way rule.

Task: feat/778-worker-agents-deny-unused-tools
Refs #778
The agent design doc and the Unreleased changelog bullet now cover all six
agents that deny Monitor, TaskStop, Workflow, Artifact, ListAgents and
ReportFindings: Code, Fix, Refactor, Research, Harden and Polish. Each
gives its reason. The headless figure stays scoped to a Code start. The
ceiling sentence adds the five Research, Harden and Polish rows, +85
bytes each.

Task: feat/778-worker-agents-deny-unused-tools
Refs #778
@dean0x

dean0x commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner Author

Review and test evidence (head e94a919)

Implement gates (at 99cdbbf)

Gate level lean. Polish: skipped (lean). Self-review: one fix (a reason sentence, 99cdbbf). Alignment: 7 of 7 criteria met.

Code review (cycle 1, at 5a8d1ef)

Gate level lean: security, testing and reliability. Result: approved with comments. 0 critical, 0 high, 2 medium, 4 suggestions. Security found no issues.

  • Medium: the reason "they run every command in the foreground" was not true for Harden. A spawned agent's call that passes its time limit moves to the background, and Harden has no wait rule for it.
  • Medium: a new test checked the line order of the six names. The run time reads the list as a set.

Resolution (at e94a919)

Fixed 5, deferred 1, false positive 0, escalated 0.

  • The reason text is corrected in the fixture, docs/reference/agent-design.md and the CHANGELOG entry. No agent file changes, and no bytes are added (48d7765).
  • The line-order test and its constant are removed. The set check stays (98c625d).
  • The allowlist check now also matches a scoped tool entry, such as Name(x). Its probe tests the bare and the scoped form of each shared name (98c625d).
  • Two wording fixes: a test comment (98c625d) and a knowledge-base sentence (e94a919).
  • Deferred (local): the allowlist probe uses the non-empty check of the test before it, and has no non-empty check of its own.

Evidence

  • Full suite at e94a919: 408 files, 19,216 passed, 8 skipped, exit 0 (Node 24). Build and typecheck pass. Lint is not configured.
  • GitHub CI: passing on e94a919.
  • Headless measure (Claude Code 2.1.322, at 99cdbbf; no agent file changed since): Harden start tokens main 20,597, branch 20,586. Saving: 11 tokens. Polish and Research: not measured.
  • Test plan at e94a919: 8/8 verified (VERIFIED-CI 5, ATTESTED-LOCAL 3, UNVERIFIED 0, FAILED 0). TP-8 now runs a word-bounded search with an exit code (exit 0).

Merge readiness: waits for an approving review. CI is clear. No review threads are open.

The allowlist check now compares the name before the first parenthesis,
so a scoped entry such as Agent(x) is reported like the bare name. The
known-bad probe seeds both forms for every shared name. The test that
pinned the line order of the six added names is gone, with its constant.
A new deny row still joins every loop; the deny-set pin names the rows.

Refs #778
The six agents start no background run. A spawned subagent whose
foreground call passes its timeout is re-invoked by the end notice, so
none needs Monitor. The old text said they run every command in the
foreground, which does not hold for Harden.

Refs #778
@dean0x
dean0x merged commit 9c1f04f into main Nov 10, 2026
3 checks passed
@dean0x
dean0x deleted the feat/778-worker-agents-deny-unused-tools branch November 10, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Other worker agents: deny the tools that they never use

1 participant