githubnext / githubnext/gh-aw-cao
[aw] AW Optimization / AGENTS.md hit shell expansion guard rejection
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 1
- Avg merge
- 49m
- Merged PRs (30d)
- 837
Description
### Workflow Failure
**Workflow:** [AW Optimization / AGENTS.md](https://github.com/githubnext/gh-aw-cao/blob/main/.github/workflows/optimization-agents-md-curator.md)
**Branch:** main
**Run:** https://github.com/githubnext/gh-aw-cao/actions/runs/34508569675
> [!WARNING]
> **Shell Expansion Guard Rejected Command**: The sandbox rejected a shell command because expansion patterns looked unsafe.
This signal was detected from engine runtime logs and is usually caused by retrying a multi-line shell command that embeds safe-output JSON or Markdown directly in the command text.
How to remediate
- Do **not** retry the identical rejected command.
- Put multi-line content in a temporary file with a single-quoted heredoc.
- Use `jq -Rs` to JSON-escape the file contents before piping to `safeoutputs`.
```bash
cat <<'EOF' > /tmp/gh-aw/body.md
Title
Multi-line body content goes here.
EOF
jq -Rs '{title: "My title", body: .}' /tmp/gh-aw/body.md | safeoutputs create_discussion .
```
### Action Required
**Assign this issue to an agent** to debug and fix the issue.
Debug with any coding agent
Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):
````
Debug the agentic workflow failure using https://raw.githubusercontent.com/github/gh-aw/main/debug.md
The failed workflow run is at https://github.com/githubnext/gh-aw-cao/actions/runs/34508569675
````
Manually invoke the agent
Debug this workflow failure using your favorite Agent CLI and the `agentic-workflows` prompt.
- Start your agent
- Load the `agentic-workflows` skill from `.github/skills/agentic-workflows/SKILL.md` or
- Type `debug the agentic workflow optimization-agents-md-curator failure in https://github.com/githubnext/gh-aw-cao/actions/runs/34508569675`
> [!TIP]
>
> Stop reporting this workflow as a failure
>
> To stop a workflow from creating failure issues, set `report-failure-as-issue: false` in its frontmatter:
> ```yaml
> safe-outputs:
> report-failure-as-issue: false
> ```
>
>
> Generated from [AW Optimization / AGENTS.md](https://github.com/githubnext/gh-aw-cao/actions/runs/34508569675) · copilot · 280 AIC · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-cao+is%3Aissue+%22gh-aw-workflow-id%3A+optimization-agents-md-curator%22&type=issues)
> - [x] expires on Sep 17, 2026, 5:59 PM UTC
Contributor guide
Research direction
Start with the failed run linked in the issue and read .github/workflows/optimization-agents-md-curator.md to understand the workflow. Consult debug.md and .github/skills/agentic-workflows/SKILL.md for the debugging process, then verify that the workflow no longer triggers the shell expansion guard and completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100