Agent Skills `allowed-tools` frontmatter specs not respected in non-interactive mode
Describe the bug
GIVEN any generic skill like:
---
name: greet-user
description: use when a user offers a greeting
allowed-tools:
- bash
- shell
- powershell
- any-other-tool
---
Run the `./scripts/greet.sh`
<!-- (or `./scripts/greet.py`, `./scripts/greet.bat`, `./scripts/greet.ps1`, etc.) -->
WHEN I prompt with "hello" in interactive mode in Copilot
THEN It works as expected and the script runs, but
WHEN I prompt with "hello" in NON-interactive mode (e.g. copilot -p "hello")
THEN I get a ton of Permission denied and could not request permission from user
AND A ton of wasted tokens, time, and money
Affected version
1.0.60
Steps to reproduce the behavior
All in the above description.
Expected behavior
If a tool is marked as allowed, IT SHOULD BE ALLOWED.
Additional context
No response
Non-interactive mode needs a complete preflight. Resolve the skill, its allowed-tools declaration, and the requested capability set before starting the model loop; if any capability cannot be granted without a human prompt, fail once with a machine-readable explanation. Do not repeatedly ask the model to recover from an impossible approval channel. The same normalized policy evaluator should be used in interactive and non-interactive modes, with tests for aliases, unknown tools, nested skills, and a denied tool.