You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot create PR modifying .github/workflows/* due to disallowed workflows:write permission #16163
This is a builtin protection to actions. The GitHub actions user cannot write to these files.
You need to use a custom token or a GitHub app.
Thanks for clarifying — that makes sense from a security perspective.
One important constraint in this case is that when using safe_outputs.create-pull-request, the token is managed internally
and cannot be replaced with a custom token or GitHub App credential.
So even if we want to use a token with workflows: write,
there is currently no way to supply it to safe_outputs.
Given that limitation, what is the recommended pattern for agents that
need to propose changes to .github/workflows/*?
For example, a CI optimization agent that:
analyzes workflow performance
suggests improvements
opens a PR updating ci.yml
Is the expectation that:
Workflow files should never be modified via safe_outputs?
A separate automation pipeline should be used outside gh-aw?
Workflows should be structured so only non-workflow files change?
Would appreciate clarification on the intended architecture here.
Activity
pelikhan commentedon Feb 16, 2026
This is a builtin protection to actions. The GitHub actions user cannot write to these files.
You need to use a custom token or a GitHub app.
elika56 commentedon Feb 16, 2026
Thanks for clarifying — that makes sense from a security perspective.
One important constraint in this case is that when using
safe_outputs.create-pull-request, the token is managed internallyand cannot be replaced with a custom token or GitHub App credential.
So even if we want to use a token with
workflows: write,there is currently no way to supply it to
safe_outputs.Given that limitation, what is the recommended pattern for agents that
need to propose changes to
.github/workflows/*?For example, a CI optimization agent that:
ci.ymlIs the expectation that:
Would appreciate clarification on the intended architecture here.
strawgate commentedon Feb 17, 2026
Maybe this is just a feature request to add the GitHub token override to the create pr safe output and push to pr branch safe output?
elika56 commentedon Feb 17, 2026
you are correct. what should i do in order to open this as a feature request?
dsyme commentedon Feb 17, 2026
Hmmmm it should be possible to specify a token, see here https://github.github.com/gh-aw/reference/safe-outputs/#global-configuration-options
Have you tried that? Thanks
dsyme commentedon Feb 17, 2026
I believe this is fixed by #16427
cc @pelikhan to confirm