You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Count Only Real Heredoc Openers in the Guard's In-Order Reading #2201
The #2112 fix (handoff #2123) adds, on the ordinary path of host-setup/agent-safety/claude/gh-write-guard.py, a reading that strips every heredoc body a line opens in order. It builds that reading from every << token the line yields, including one bash never queues a body for, such as a quoted '<<' or a << inside a comment. That reading strips real command lines up to the false tag, and where the tag line sits inside a later document's body, the rest of the document is read as commands, so a document quoting a wait loop is denied rather than written. Develop allows it.
Bash writes the loop into doc.md and runs nothing. The branch denies the command, and develop allows it. Writing the first line as cat <<A >/dev/null # like <<B behaves the same.
Done looks like
The in-order reading counts only openers bash queues a body for, the commands above are allowed, and self-test rows pin both as allows.
Found by the local strict review of the #2112 fix, and filed as a follow-up under decision #2126, which shipped that fix with its known false denies filed rather than fixed.
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.
Activity
Strip Every Heredoc Body a Line Opens in the Wait-Loop Rule (#2203)
ptr727 commentedon Oct 8, 2026
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.