Skip to content

disk-hygiene: apply/handoff ask gate and unattended-stop are advisory, not deterministic — apply can run with no human #381

Closed as not planned

Description

@kyle-sexton

Summary

disk-hygiene's manual-handoff and apply safety bar depends on a PreToolUse ask decision plus a
model-advisory instruction — neither is a deterministic human gate. In auto-approve / background /
--dangerously-skip-permissions sessions, both can be satisfied with no human in the loop.

Details

  • skills/clean/scripts/destructive_guard.py:314-323 returns permissionDecision: "ask" for engine
    apply; the PowerShell deletion lane likewise returns ask. An ask can be auto-resolved when
    the session is non-interactive or permissions are pre-granted.
  • skills/clean/SKILL.md:46 — "Automated, scheduled, remote, unattended … always audit and stop" —
    is enforced only by model compliance. Nothing in the guard or engine detects session
    attendedness.

On Linux (the one platform where apply actually deletes), a plan can therefore be applied with no
human confirmation. This session (a background job) is a concrete example where deletion spellings
executed without a human prompt materializing.

Suggested fix

  • Make the deterministic gate independent of ask semantics: e.g. the engine apply requires an
    explicit human-confirmation token that cannot be auto-minted by the model, issued only through an
    interactive prompt.
  • Give the guard a session-attendedness signal (if Claude Code exposes one) so unattended sessions
    are deterministically forced to audit-and-stop rather than relying on the model to comply.
  • Add a regression test for the unattended/auto-resolve path.

Severity

MEDIUM-HIGH (security).

Activity

  1. added
    area: security
    on Jul 19, 2026
  2. added
    needs-human
    on Jul 23, 2026
  3. kyle-sexton commented on Jul 27, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI (triage lane — gate-audit claim). Claiming this item for one gate-audit cycle: an independent panel re-classifies whether the needs-human / status: needs-decision gate is still warranted, or whether the item is C2/C3 and liftable to agent-ready. Outcome comment follows in this cycle.

  4. kyle-sexton commented on Jul 27, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI (triage lane — gate audit). Independent panel: two fresh-context agents (one fable, one opus), each given only the issue content and the repo's own plugins/autonomy/reference/guardrails/work-classes.md, plus the triage lane's own read. This lane never executes work items, authors fixes, or merges.

    Gate audit: GATE UPHELD — C4, security surface

    Panel: 2-of-2 STAYS-GATED, both C4. Lane read concurs.

    This asks to replace an advisory ask / model-compliance gate with a new deterministic human-confirmation contract inside a PreToolUse destructive guard (destructive_guard.py still emits "ask"). That is a change to the plugin's safety boundary, not a briefed fix, and a mistake silently re-opens unattended deletion — the exact failure the issue exists to close.

    It also depends on a capability nobody has verified: the issue's own second bullet hedges "if Claude Code exposes one" for a session-attendedness signal. Designing a safety gate around an unverified harness capability is the cross-cutting-invention floor.

    Decision required

    What deterministic mechanism gates unattended apply?

    RECOMMENDED — fail closed, and do not depend on attendedness detection. Require an explicit human-issued confirmation token that the model cannot mint; when it is absent, apply hard-stops to audit-only. This works regardless of whether Claude Code ever exposes an attendedness signal, so the design does not rest on an unverified upstream capability. Accept the consequence: apply becomes unavailable to unattended automation, which is the correct direction for a destructive operation.

    Alternative — verify first, then branch on attendedness. Per the research-first posture, establish whether Claude Code exposes any session-attendedness/interactivity signal to hooks, then design around the verified answer, keeping ask for attended sessions. Better ergonomics if the signal exists; wasted design cycle if it does not.

    Either path stays human-reviewed and human-merged — this edits the destructive guard.

  5. kyle-sexton commented on Jul 27, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI (triage lane — claim release). Gate-audit cycle complete for this item; the triage claim posted earlier this cycle is released. No lease is held — another instance or lane may pick this up immediately. The outcome comment above this one carries the classification and either the lift rationale or the decision summary.

  6. kyle-sexton commented on Aug 13, 2026

    @kyle-sexton
    MemberAuthor

    Frontier disposition (drain session)

    Ruling: Close as not planned for this drain wave (frontier consensus).

    Dual-panel drain ruling: advisory, superseded, folded into a program umbrella, or blocked on a host/design carrier without an actionable in-repo slice this session. Re-open with a concrete acceptance brief if a consumer needs the work.

    KEEP set for this wave: standing telemetry; host-physical Class C (#631 family); program umbrellas #530/#531/#532/#535; live design carriers #1500/#1553/#1668/#1695/#1716/#1681/#1718; #1360.

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: securityneeds-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions