Skip to content

Stop Two-Heredoc Lines Doubling the Guard's Readings per Line #2199

Closed as not planned

Description

@ptr727

Problem

The #2112 fix on branch feature/auto-2112 (handoff #2123) reads a line opening two data heredocs both as opening its first alone and as opening both in order. The two readings never meet again, so n such lines build 2^n readings. Once the count passes the reading limit the guard denies, so a command develop allows is denied on the branch although no loop runs in it.

Reproduce (constructed)

Five lines of the form cat <<A <<B, each followed by bodies closed by A and B, with document text naming both sleep and while, pass the reading limit and are denied. Develop allows the same command.

Done looks like

The first-alone and in-order readings are built once each across the whole command rather than per line, so only lines holding (( or $[ multiply readings, and a self-test row pins the five-line command as an allow.

Found by the third local strict review pass of the #2112 fix, and filed as a follow-up per decision #2126.

Activity

  1. added
    bug
    agents
    on Oct 1, 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

    agentsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions