Skip to content

Decide How Unattended Work on the Guard Continues After an Edit Refusal (#2207) #2210

Closed

Description

@ptr727

Question

The unattended worker on handoff #2209 (track auto-2207) could not edit host-setup/agent-safety/claude/gh-write-guard.py. The session's auto-mode permission classifier refused the edit as self-modification of the agent's own safety hook. The worker did not route around that refusal. How should #2207, and other unattended work in that file, continue?

Handoff: #2209 (track auto-2207). No branch, worktree, or pull request exists, since the refusal came before any change was written. No pull request is blocked.

The intended fix

As #2207 states: _loop_parts takes the quote mask _unbounded_wait_loop already computes. A do or done counts as the keyword only when neither it nor the token before it is quoted. A self-test row pins while true; do echo ";" done; sleep 1; done as denied.

Options

  1. Recommended: work The Guard's Wait-Loop Rule Closes a Loop at a Quoted Separator Before done #2207 in an attended session. Resume Session Handoff [auto-2207]: Ignore a Quoted Separator When the Guard Finds a Loop's done per #2207 #2209 with the maintainer present, approve the edit when the prompt appears, then drive it to develop as the handoff states. The reason: an unattended agent loosening or rewriting its own guard is the case the classifier exists for, and an attended approval keeps a human on each such edit. Open issues The Guard's Wait-Loop Rule Misses a Loop Inside a Process Substitution #2204, The Guard's Wait-Loop Depth Cap Allows a Loop Nested Past It #2205, and The Guard's Wait-Loop Rule Misses a Loop Inside a Double-Quoted Command Substitution #2206 edit the same file and would meet the same refusal unattended, so they would go the same way.
  2. Add a permission rule so unattended workers may edit host-setup/agent-safety/ in a worktree. The loop could then work guard issues with no one present. This widens what an unattended agent may do to its own safety hook, and the change is to this machine's settings rather than to the repository.
  3. Have the unattended picker skip any issue whose fix edits host-setup/agent-safety/. That would be rule text in the unattended-handoff skill's "Auto-Resolvable" list, so no future round spends a worker on an edit it cannot make. It combines with option 1.

Activity

  1. added
    decision
    on Oct 1, 2026
  2. ptr727 commented on Oct 1, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer: options 1 and 3. Guard fixes (#2207, #2204, #2205, #2206) are worked in attended sessions only, with the maintainer approving each edit, and the unattended picker skips any issue whose fix edits host-setup/agent-safety/, filed as #2248.

  3. removed
    decision
    on Oct 1, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions