Skip to content

Quoted Operator as a Redirect Target Draws a False Deny From the Guard's Wait Rule #2075

Closed as not planned

Description

@ptr727

The write guard's wait rule denies a read loop whose input redirect names a file spelled like a shell operator, where develop allows it. The #1910 branch introduces this. Its _redirects_stdin refuses an operator token as a redirect's target, per #2023, and _operator_lex strips quotes before that check, so a quoted operator reaches it as a bare one.

Shape

A constructed example, allowed on develop and denied on the #1910 branch:

while read l; do sleep 30; done < ";"

Bash reads ";" as a file named ;, which ends, so the loop is bounded by its input. The branch sees a bare ; after the <, takes it as a separator rather than a target, and reads the redirect as naming no source.

Direction

Carry whether a token was quoted through _operator_lex, so the target check refuses only an unquoted operator. Add the example above as an allow case beside the dangling done < deny case.

Found by the fourth local strict review of the #1910 branch (handoff #2041). The maintainer accepted it as a tracked false deny on #2045, beside #1958 and #1959.

Activity

  1. added
    bug
    agents
    introduced
    on Sep 29, 2026
  2. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The guard backstops an agent's own mistakes, and this is a command shape built to defeat it rather than one an agent session writes, so a miss does not realistically occur. See #2517 for the per-issue reason.

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

    agentsbugintroduced

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions