Repository navigation
Description
Problem
Stop the harness from denying its own documented jq -Rs "$FILE" safe-outputs pattern — it turns one blocked comment into a full invocation-cap failure. Design Decision Gate ran PR #49066's ADR gate, tried to post the required comment, and got denied 5 different ways before burning out.
Affected Workflows and Run IDs
- Design Decision Gate 🏗️ — §30520617010 (2026-07-30 06:45 UTC, PR stringsconcatloop: detect
x = x + yaccumulator pattern alongside+=#49066) - Comparator (same workflow, succeeded): §30520438606
Probable Root Cause
Fix the sandbox's path-expansion check — it blocks the exact pattern the system prompt tells agents to use. The agent tried, in order:
printf '%s' '...' | safeoutputs add_comment --pull_request_number 49066 --body -cat > /tmp/gh-aw/agent/comment.json << 'ENDJSON' ... | safeoutputs add_comment .jq -Rs --argjson pr 49066 '{...}' /tmp/gh-aw/agent/comment-body.md | safeoutputs add_comment .jq -Rs --argjson pr 49066 '{...}' /tmp/gh-aw/agent/comment-body.md > .../comment-payload.jsonFILE=/tmp/gh-aw/agent/comment-body.md && jq -Rs --argjson pr 49066 '{...}' "$FILE"
Every variant that referenced the file via a shell variable or heredoc path was rejected with Shell expansion syntax in paths requires manual approval. This is the same jq -Rs idiom the harness's own reporting instructions recommend for injecting file content into safe-output fields — the permission policy and the documented workflow contradict each other.
Each denied attempt still consumed one of the harness's 20 LLM invocations per run. After the 5th denial the agent had also begun hitting Anthropic API 429s; it stacked 10 consecutive rate-limit backoffs (582ms → 39880ms, ~2 min total) before the harness gave up with Maximum LLM invocations exceeded (20 / 20). audit-diff against the nearest successful run of the same workflow shows zero firewall/MCP/domain drift, ruling out a sandbox network regression — this is a harness-side permission-policy/invocation-budget interaction, not a tooling or network issue.
Specific Proposed Remediation
- Allow the
$VAR/heredoc-to-filejq -Rspattern when the variable is locally assigned in the same command (not sourced from untrusted external content) — this is the exact pattern the harness tells agents to use for safe-outputs body injection. - Detect repeated identical-intent denials (same target file/tool, different shell syntax) and short-circuit after 2 attempts with a clearer error, instead of letting the agent burn its full invocation budget rediscovering the same block 5 times.
- Separately: investigate why this run's API calls stacked 10 consecutive 429s — check whether concurrent workflow runs in this window were saturating a shared rate-limit pool.
Success Criteria / Verification
- Re-run Design Decision Gate (or a synthetic repro) using the documented
jq -Rs --arg ... "$FILE"pattern and confirm it is not denied. - Confirm a denied safe-outputs write attempt no longer costs more than 1–2 invocations before the agent either succeeds via an approved path or reports
missing_tool/missing_datacleanly. - No recurrence of
Maximum LLM invocations exceededtied to this pattern across the next 6h investigation window.
Related to [aw-failures] [aw] Failure Investigator Report — 2026-07-30 (6h) #49095
Generated by 🔍 [aw] Failure Investigator (6h) · agent · 91.7 AIC · ⌖ 22.4 AIC · ⊞ 6.8K · ◷
- expires on Aug 5, 2026, 11:49 PM UTC-08:00
Problem
Stop the harness from denying its own documented jq -Rs "$FILE" safe-outputs pattern — it turns one blocked comment into a full invocation-cap failure. Design Decision Gate ran PR #49066's ADR gate, tried to post the required comment, and got denied 5 different ways before burning out.
Affected Workflows and Run IDs
- Design Decision Gate 🏗️ — §30520617010 (2026-07-30 06:45 UTC, PR stringsconcatloop: detect
x = x + yaccumulator pattern alongside+=#49066) - Comparator (same workflow, succeeded): §30520438606
Probable Root Cause
Fix the sandbox's path-expansion check — it blocks the exact pattern the system prompt tells agents to use. The agent tried, in order:
printf '%s' '...' | safeoutputs add_comment --pull_request_number 49066 --body -cat > /tmp/gh-aw/agent/comment.json << 'ENDJSON' ... | safeoutputs add_comment .jq -Rs --argjson pr 49066 '{...}' /tmp/gh-aw/agent/comment-body.md | safeoutputs add_comment .jq -Rs --argjson pr 49066 '{...}' /tmp/gh-aw/agent/comment-body.md > .../comment-payload.jsonFILE=/tmp/gh-aw/agent/comment-body.md && jq -Rs --argjson pr 49066 '{...}' "$FILE"
Every variant that referenced the file via a shell variable or heredoc path was rejected with Shell expansion syntax in paths requires manual approval. This is the same jq -Rs idiom the harness's own reporting instructions recommend for injecting file content into safe-output fields — the permission policy and the documented workflow contradict each other.
Each denied attempt still consumed one of the harness's 20 LLM invocations per run. After the 5th denial the agent had also begun hitting Anthropic API 429s; it stacked 10 consecutive rate-limit backoffs (582ms → 39880ms, ~2 min total) before the harness gave up with Maximum LLM invocations exceeded (20 / 20). audit-diff against the nearest successful run of the same workflow shows zero firewall/MCP/domain drift, ruling out a sandbox network regression — this is a harness-side permission-policy/invocation-budget interaction, not a tooling or network issue.
Specific Proposed Remediation
- Allow the
$VAR/heredoc-to-filejq -Rspattern when the variable is locally assigned in the same command (not sourced from untrusted external content) — this is the exact pattern the harness tells agents to use for safe-outputs body injection. - Detect repeated identical-intent denials (same target file/tool, different shell syntax) and short-circuit after 2 attempts with a clearer error, instead of letting the agent burn its full invocation budget rediscovering the same block 5 times.
- Separately: investigate why this run's API calls stacked 10 consecutive 429s — check whether concurrent workflow runs in this window were saturating a shared rate-limit pool.
Success Criteria / Verification
- Re-run Design Decision Gate (or a synthetic repro) using the documented
jq -Rs --arg ... "$FILE"pattern and confirm it is not denied. - Confirm a denied safe-outputs write attempt no longer costs more than 1–2 invocations before the agent either succeeds via an approved path or reports
missing_tool/missing_datacleanly. - No recurrence of
Maximum LLM invocations exceededtied to this pattern across the next 6h investigation window.
Related to [aw-failures] [aw] Failure Investigator Report — 2026-07-30 (6h) #49095
Generated by 🔍 [aw] Failure Investigator (6h) · agent · 91.7 AIC · ⌖ 22.4 AIC · ⊞ 6.8K · ◷
- expires on Aug 5, 2026, 11:49 PM UTC-08:00
Recurrence confirmed — 2 more Design Decision Gate runs hit the exact same invocation-cap exhaustion tonight, blocking 2 PRs' merge gates.
New occurrences (2026-08-02 23:09–23:23 UTC), both ending API Error: Request rejected (429) · Maximum LLM invocations exceeded (20 / 20):
| Run | Time (UTC) | PR | Signal |
|---|---|---|---|
| §30771643079 | 23:09 | #49859 | 24 turns; permission_denials show repeated blocked attempts to post the ADR-required comment (compound && Bash command requiring manual approval, then a wc/file-read blocked as outside the allowed working directory) plus a broken push_to_pull_request_branch call (missing required message field) — same "denied 5 different ways" shape this issue documents, before hitting the invocation cap. |
| §30771862187 | 23:15 | #49866 | 22 turns; permission_denials list 9 distinct retry attempts to post the same ADR-required comment via safeoutputs add_comment — varying the shell construction each time (jq -Rs piped, heredoc-to-file, cp to repo dir, plain literal) — all denied, ending the same Maximum LLM invocations exceeded (20 / 20) 429. |
Both are the exact root cause this issue already identifies: the agent's repeated attempts to route a safe-output comment body through a file (jq -Rs .../safeoutputs add_comment .) get denied for shell-expansion/path-approval reasons, so it keeps trying new shell constructions — each attempt burns one of the 20-invocation budget — until the run dies mid-task with the ADR gate comment never posted on either PR.
Why this matters now: this is not a one-off — it has now recurred on 2 more PRs (#49859, #49866) in a single 6h window, and in both cases the Design Decision Gate's actual job (blocking merge until an ADR is linked) failed to even post its comment, so the gate provided no signal to either PR author.
Action: ship remediation item #2 from this issue (short-circuit after 2 identical-intent denials with a clear error) first — it's the cheapest fix and stops the invocation-budget bleed regardless of whether item #1 (allowing the $VAR/heredoc jq -Rs pattern) also ships.
No new issue filed — same tracked signature, now confirmed recurring.
Generated by 🔍 [aw] Failure Investigator (6h) · agent · 227.4 AIC · ⌖ 47.2 AIC · ⊞ 5.3K · ◷
New occurrence — 2026-08-03 (6h window)
Escalate the fix — the invocation-cap burn now happens from rate-limiting alone, no permission-denial required. Two more Design Decision Gate 🏗️ runs failed with the exact Maximum LLM invocations exceeded (20 / 20) signature:
- §30816190132 (2026-08-03 13:03 UTC) — 10 consecutive Anthropic
429 rate_limitretries (533ms → 39880ms backoff, ~2 min total) burned the invocation cap; harness loggedattempt 1: maximum LLM invocations exceeded — not retrying (non-retryable guard condition)withisRateLimitError=true. Onepermission_denialsentry was present butpermissionDeniedCount=0— this run is not primarily the shell-expansion bug, it's pure API-side rate limiting. - §30815302424 (2026-08-03 12:54 UTC) — same workflow/step (
Execute Claude Code CLI), consistent with the same failure class (truncated log evidence, same job).
Why this matters
The original fix scope (stop denying the documented jq -Rs safe-outputs pattern) only addresses one trigger of the retry storm. This confirms the deeper problem: the per-run 20-invocation budget doesn't distinguish productive turns from forced retries on transient external errors (429s, permission denials). Any sustained 429 burst alone can exhaust the cap even with zero denied tool calls.
Recommendation
Prioritize a harness-level fix: don't count API-retry attempts against the LLM invocation cap (or raise the cap / use a separate retry budget) when the retry is driven by a 429 rate_limit response — independent of, and in addition to, the shell-expansion permission fix already scoped here.
Generated by 🔍 [aw] Failure Investigator (6h) · agent · 78.2 AIC · ⌖ 42.4 AIC · ⊞ 6.8K · ◷
Activity
github-actions commentedon Jul 30, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🍪 Issue Monster selected this for Copilot
I identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Jul 30, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🍪 Issue Monster selected this for Copilot
I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Jul 30, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🍪 Issue Monster selected this for Copilot
I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Jul 30, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🍪 Issue Monster selected this for Copilot
I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Jul 30, 2026
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Aug 6, 2026
This issue was automatically closed because it expired on 2026-08-06T07:49:38.652Z.