Summary
The protected-files field under create-pull-request safe-outputs is documented as supporting an object form with policy and exclude, but gh aw compile rejects it with a schema validation error.
Steps to reproduce
- Add the following to a workflow's frontmatter:
safe-outputs:
create-pull-request:
title-prefix: "[docs] "
protected-files:
policy: fallback-to-issue
exclude:
- .claude/
- .github/instructions/
allowed-files:
- README.md
- CLAUDE.md
- Run
gh aw compile
Expected behavior
Compilation succeeds, with .claude/ and .github/instructions/ excluded from the protected set per the documented object-form syntax.
Actual behavior
.github/workflows/docs-sync.md:25:23: error: expected string or null, got object.
Expected format: {"footer":true,"preserve-branch-name":true,"reviewers":null}
The compiler only accepts string values (blocked, fallback-to-issue, allowed) or null for protected-files.
Documentation reference
The safe-outputs pull requests reference shows this as a valid configuration:
safe-outputs:
create-pull-request:
protected-files:
policy: fallback-to-issue
exclude:
- AGENTS.md
- .agents/
Use case
We have a documentation sync workflow that needs to update files under .claude/rules/ and .github/instructions/. Both paths fall under default protected path prefixes (.claude/ and .github/). Using protected-files: allowed is the current workaround, but it's broader than intended and often raises permission-denied errors — we'd prefer to exclude only the specific prefixes the agent needs to write to and not get denied permissions.
Environment
(CLI was updated via gh aw update on 2026-04-24)
Summary
The
protected-filesfield undercreate-pull-requestsafe-outputs is documented as supporting an object form withpolicyandexclude, butgh aw compilerejects it with a schema validation error.Steps to reproduce
gh aw compileExpected behavior
Compilation succeeds, with
.claude/and.github/instructions/excluded from the protected set per the documented object-form syntax.Actual behavior
The compiler only accepts string values (
blocked,fallback-to-issue,allowed) or null forprotected-files.Documentation reference
The safe-outputs pull requests reference shows this as a valid configuration:
Use case
We have a documentation sync workflow that needs to update files under
.claude/rules/and.github/instructions/. Both paths fall under default protected path prefixes (.claude/and.github/). Usingprotected-files: allowedis the current workaround, but it's broader than intended and often raises permission-denied errors — we'd prefer to exclude only the specific prefixes the agent needs to write to and not get denied permissions.Environment
(CLI was updated via
gh aw updateon 2026-04-24)