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
However, the gh pr create call fails (or silently skips) because the GitHub App / installation token that wanman provisions does not include the required scopes/permissions.
Observed in: takeover of nicgzlfly/-_the-crowd (2026-04-30)
Missing permissions
Permission
Needed for
Observed state
pull_requests: write
gh pr create — agents opening PRs
❌ missing
actions: write (or read)
Agents reading CI run status via gh run list / triggering re-runs
I checked the current takeover code and agree that this is still a real preflight/docs gap.
Code evidence:
The generated dev workflow in packages/cli/src/takeover-project.ts explicitly tells agents to git push -u origin wanman/<task-slug> and then run gh pr create.
The CTO workflow in the same file expects gh pr checks, gh pr review, and gh pr merge to work.
packages/cli/src/takeover-local.ts has detectPullRequestUrl(), but it only runs gh pr list --head ... and returns undefined on any error. It does not distinguish “no PR yet” from “GitHub auth/token cannot read PRs”.
I did not find a startup preflight that verifies PR/action permissions before the agents begin work.
One caveat: gh api repos/{owner}/{repo} --jq '.permissions' verifies the active gh token’s repo role, but it does not necessarily prove that a separate GitHub App installation token has pull_requests: write or actions: read. If takeover can run under either a user token or an app token, the check should be tied to the exact credential that agents will inherit.
Suggested acceptance for a fix:
During wanman takeover startup, detect the Git remote owner/repo.
Run a credential preflight for the actual token exposed to agents:
can read repo metadata
can push a branch or at least has contents write capability when that mode is expected
can create/read PRs
can read Actions runs if the generated workflow tells CTO to use gh pr checks / gh run list
If any check fails, fail early with a concrete remediation message instead of letting the dev/CTO agents discover it mid-task.
Update the takeover docs with the minimum required GitHub permissions for both user-token and GitHub-App-token modes.
So I would keep this open. The fix is probably a preflight + docs change rather than only changing the prompt.
Activity
guo-yu commentedon May 16, 2026
I checked the current takeover code and agree that this is still a real preflight/docs gap.
Code evidence:
packages/cli/src/takeover-project.tsexplicitly tells agents togit push -u origin wanman/<task-slug>and then rungh pr create.gh pr checks,gh pr review, andgh pr mergeto work.packages/cli/src/takeover-local.tshasdetectPullRequestUrl(), but it only runsgh pr list --head ...and returnsundefinedon any error. It does not distinguish “no PR yet” from “GitHub auth/token cannot read PRs”.One caveat:
gh api repos/{owner}/{repo} --jq '.permissions'verifies the activeghtoken’s repo role, but it does not necessarily prove that a separate GitHub App installation token haspull_requests: writeoractions: read. If takeover can run under either a user token or an app token, the check should be tied to the exact credential that agents will inherit.Suggested acceptance for a fix:
wanman takeoverstartup, detect the Git remote owner/repo.gh pr checks/gh run listSo I would keep this open. The fix is probably a preflight + docs change rather than only changing the prompt.