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
Read a Run as No Bound Where the Quote Mask Is Unknown in the Wait-Loop Check #2307
The wait-loop check in host-setup/agent-safety/claude/gh-write-guard.py walks back from a bash -c wrapper to the previous unquoted shell operator to find the command run the wrapper sits in. It tells a quoted operator from a real one by the quote mask. Where _quoted_mask returns None, every operator token is read as unquoted.
That happens when _operator_lex raises and _shell_tokens falls back, which an unbalanced quote anywhere in the command does, a comment included. Then a quoted ; before an inner timeout ends the run early, the outer timeout is never read, and a nested timeout whose outer signal ends the inner one before its deadline is read as bounded.
The same command without the trailing comment is denied.
Done looks like
The check reads a run as no bound wherever the quote mask is unknown and an operator stands between the wrapper and an earlier timeout on the line, or another reading closes the gap, with a self-test row for the shape above and README requirement 7 updated to match.
Found by a local strict review pass on #2117. It predates that pull request.
A second trigger for the same None mask, found by a local strict review pass on #2117: a balanced command holding a backtick, which the marked lex does not model, together with a word that joins two quoted parts, such as "a"b. The quote-keeping lex then splits differently from the shell tokens, the alignment fails, and the mask is None. Constructed example, read as bounded:
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
ptr727 commentedon Oct 3, 2026
A second trigger for the same None mask, found by a local strict review pass on #2117: a balanced command holding a backtick, which the marked lex does not model, together with a word that joins two quoted parts, such as
"a"b. The quote-keeping lex then splits differently from the shell tokens, the alignment fails, and the mask is None. Constructed example, read as bounded:Without the trailing
echo, the check denies it. A fix on the None path covers both triggers.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.