Skip to content

Allow read-only shell tools in Discussion Task Miner to prevent tool-denial cascade - #50686

Merged
pelikhan merged 3 commits into
mainfrom
copilot/aw-failures-fix-sed-read-issue
Aug 5, 2026
Merged

Allow read-only shell tools in Discussion Task Miner to prevent tool-denial cascade#50686
pelikhan merged 3 commits into
mainfrom
copilot/aw-failures-fix-sed-read-issue

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Discussion Task Miner's bash allowlist permitted only find, jq, cat, and date. When the agent tried to page through its own scratch file with sed -n '205,260p' /tmp/gh-aw/agent/50544.md, the call was denied, retried with the same shape, and tripped max-tool-denials: 3, killing the SDK session and burning the run's invocation cap.

Changes

  • .github/workflows/discussion-task-miner.md — extend the tools.bash allowlist with head *, tail *, sed -n *, and wc *, matching the pattern already used by daily-community-attribution.md and daily-spdd-spec-planner.md.
  • .github/workflows/discussion-task-miner.lock.yml — recompiled.

Only the non-mutating sed -n form is allowed; bare sed (which supports -i in-place writes) remains denied.

tools:
  bash:
  - find .github -name "*.md"
  - jq *
  - cat *
  - head *
  - tail *
  - sed -n *
  - wc *
  - date *

Out of scope

The issue's second proposal — making guard.tool_denials_exceeded emit a missing_tool/report_incomplete signal instead of continuing to consume invocation budget — is a harness-level change affecting all workflows and is not addressed here. Worth tracking separately alongside #49096, since it's the shared mitigation for this failure class.

Verification depends on the next scheduled trigger completing without guard.tool_denials_exceeded or invocation_cap_exceeded.


Run:> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.9 AIC · ⌖ 8.46 AIC · ⊞ 8.3K ·

Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix invocation budget exhaustion due to sed read denial Allow read-only shell tools in Discussion Task Miner to prevent tool-denial cascade Aug 5, 2026
Copilot AI requested a review from pelikhan August 5, 2026 20:00
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Great work on this fix, @Copilot! 👋 This PR cleanly extends the Discussion Task Miner's bash allowlist with read-only tools (head, tail, sed -n, wc) to prevent the tool-denial cascade that was burning invocation budget.

The change is well-scoped and well-documented:

Verification will happen naturally on the next scheduled trigger — the workflow will attempt to use the newly allowed tools without hitting guard.tool_denials_exceeded. This is a solid approach for workflow configuration changes.

The PR looks ready to merge!

Generated by ✅ Contribution Check · auto · 58.1 AIC · ⌖ 4.47 AIC · ⊞ 8.8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 5, 2026 21:49
Copilot AI balanced review requested due to automatic review settings August 5, 2026 21:49
@pelikhan

pelikhan commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Discussion Task Miner’s shell allowlist to support read-only paging of scratch files.

Changes:

  • Adds head, tail, sed -n, and wc.
  • Recompiles the generated workflow.
  • However, sed -n remains incompatible with the SDK’s exact full-command matching.
Show a summary per file
File Description
.github/workflows/discussion-task-miner.md Expands the shell allowlist.
.github/workflows/discussion-task-miner.lock.yml Regenerates compiled permissions and metadata.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

- cat *
- head *
- tail *
- sed -n *
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please refresh this branch if it is behind main, resolve the merge conflicts, then run the pr-finisher skill and push any follow-up fixes.

Run: https://github.com/github/gh-aw/actions/runs/31050365846

Generated by PR Sous Chef.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.9 AIC · ⌖ 8.46 AIC · ⊞ 8.3K ·
Comment /souschef to run again

@pelikhan
pelikhan merged commit e79abdf into main Aug 5, 2026
@pelikhan
pelikhan deleted the copilot/aw-failures-fix-sed-read-issue branch August 5, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] Discussion Task Miner: sed read of agent's own scratch file denied, cascades to invocation-cap exhaustion

4 participants