Skip to content

discipline:sweep-all — "make NO writes" is unenforceable: forks receive the main conversation's exact tool pool #1622

Description

@kyle-sexton

Summary

plugins/discipline/skills/sweep-all/SKILL.md step 1 instructs each audit fork to "make NO
writes", and the skill's declared delta rests its safety on that property:

Audit in the forks, correct on the main thread. Parallel forks that wrote would race and
re-dilute salience; the value is one ordered correction pass.

That instruction is unenforceable by construction, and the skill does not acknowledge it.

Per https://code.claude.com/docs/en/sub-agents (fetched 2026-07-26), verbatim:

Subagents inherit the built-in tools and MCP tools available in the main conversation, narrowed
by two filters: the first removes a short list of tools from every subagent, and the second
reduces the built-in tool set for subagents that run in the background, which is the default.
Forks skip both filters and receive the main conversation's exact tool pool.

and, from the same page's fork-vs-named-subagent table, a fork's "System prompt and tools" are
"Same as main session", versus a named subagent's "From the subagent's definition file".

So a named subagent can be constrained with tools / disallowedTools; a fork cannot. N
parallel audit forks hold Write, Edit, and Bash while merely told not to use them. The declared
delta's entire safety argument is a prompt-level request, not a harness constraint, and the skill
presents it as though it were the latter.

Proposed fix

Two parts, and the honesty part is the non-negotiable one:

  1. Stop implying enforcement. Say plainly in Gotchas that a fork receives the main
    conversation's exact tool pool, that no tools field can narrow it, and that "make NO writes"
    is therefore an instruction the forks are trusted to honor — not a constraint the harness
    applies. Cite the page.

  2. Add the documented containment. Same page:

    When Claude spawns a fork through the Agent tool, it can pass isolation: "worktree" so the
    fork's file edits are written to a separate git worktree instead of your checkout.

    Instruct the audit fan-out to pass isolation: "worktree". This is containment, not
    enforcement
    : a fork that ignores the no-writes instruction lands its edits in a throwaway
    worktree rather than the user's checkout, and an audit fork that writes nothing leaves nothing
    behind. Residual risk stays and must be stated — a fork's Bash can still reach the network,
    ~/.claude, and paths outside the checkout.

Not to be claimed: the docs state nothing about isolation: "worktree" in a non-git project or
when the session is already inside a worktree. Neither behavior may be asserted; flag as
unverified rather than inventing a fallback.

Source: plugin-quality:audit post-use audit of discipline@0.9.0 (F3, HIGH).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.priority: highSignificant impact, or blocks an imminent release; staff this cycle.status: needs-decisionAwaiting a human or maintainer judgment call.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions