fix(delight): pre-read sampled files to eliminate view/read tool denials - #48989
Merged
Conversation
…ool denials The Delight workflow was hitting the tool-denial guardrail (3/3) because the agent used the built-in view/read tool to open sampled files via absolute paths, which is not in the Copilot SDK allowlist. Fix (DataOps pattern): - Extend pre-agent-steps to pre-read sampled file contents into *-content.txt files so the agent can access them via the already- allowed `cat /tmp/gh-aw/agent/*` bash command. - Update prompt references to use the pre-loaded content files. - Remove the xargs bash allowlist entries (no longer needed). - Recompile delight.lock.yml. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Delight exceeded tool denial limit
fix(delight): pre-read sampled files to eliminate view/read tool denials
Jul 29, 2026
pelikhan
marked this pull request as ready for review
July 29, 2026 22:27
Contributor
There was a problem hiding this comment.
Pull request overview
Preloads sampled workflow content to reduce denied SDK-native file reads in Delight.
Changes:
- Materializes sampled files under
/tmp/gh-aw/agent/. - Updates prompts and removes obsolete
xargsallowlist entries. - Recompiles the generated workflow.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/delight.md |
Adds preloading and updates prompt commands. |
.github/workflows/delight.lock.yml |
Regenerates the compiled workflow. |
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: Medium
Comment on lines
+64
to
+67
| # Pre-read file contents (eliminates view/read tool denials) | ||
| xargs -a /tmp/gh-aw/agent/doc-samples.txt cat > /tmp/gh-aw/agent/doc-samples-content.txt 2>/dev/null || echo "(no doc samples found)" > /tmp/gh-aw/agent/doc-samples-content.txt | ||
| xargs -a /tmp/gh-aw/agent/workflow-samples.txt cat > /tmp/gh-aw/agent/workflow-samples-content.txt 2>/dev/null || echo "(no workflow samples found)" > /tmp/gh-aw/agent/workflow-samples-content.txt | ||
| xargs -a /tmp/gh-aw/agent/validation-sample.txt cat > /tmp/gh-aw/agent/validation-sample-content.txt 2>/dev/null || echo "(no validation sample found)" > /tmp/gh-aw/agent/validation-sample-content.txt |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Delight workflow was hitting
guard.tool_denials_exceeded(3/3) because the Copilot SDK agent used its built-inview/readtool on sampled file paths (absolute paths), which is not in the--allow-toolallowlist. The existingxargs -a ... catbash entries were not used — the agent preferred the SDK-native file reader.Changes
pre-agent-steps: After sampling file paths, immediately read their contents into*-content.txtfiles (doc-samples-content.txt,workflow-samples-content.txt,validation-sample-content.txt) so the agent receives content directly via the already-allowedcat /tmp/gh-aw/agent/*.Prompt: Updated the three analysis sections (Documentation, AI-Generated Messages, Error Messages) to reference the pre-loaded
*-content.txtfiles instead ofxargs ... catcommands.Bash allowlist: Removed the three
xargs -a ... catentries — superseded by the DataOps pre-step.Lock file: Recompiled
delight.lock.yml.