fix(agents): let clawdbot agents open PRs — install gh + seed gh auth - #487
Merged
Conversation
Smoke test (2026-06-26) surfaced that openclaw agents could write code and git-push a branch but `gh pr create` failed: gh wasn't installed. Root cause: deploy-dev.yml passed --build-arg OPENCLAW_INSTALL_GH_CLI=1 but the openclaw Dockerfile never handled it. - Bump _external/clawdbot to include the Dockerfile fix that honors OPENCLAW_INSTALL_GH_CLI (adds the cli.github.com apt source + installs gh). - Seed gh auth in the clawdbot postStart hook: write $GH_CONFIG_DIR/hosts.yml (/state/gh on the PVC) from the trimmed GITHUB_PAT, and add GH_CONFIG_DIR to the container env so acpx_run sub-agents inherit the same auth. Now `gh pr create` works non-interactively from agent coding sessions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
samxu01
force-pushed
the
fix/agent-pr-gh-cli
branch
from
June 26, 2026 10:49
4f3e879 to
44df6ba
Compare
Contributor
Author
|
Merged to main (single clean commit on 75f0155). |
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.
Smoke-test finding → gap filled
Live multi-agent smoke test (2026-06-26): an agent wrote a TS util + Jest test and git-pushed a branch, but
gh pr createfailed — gh wasn't installed. Root cause:deploy-dev.ymlpasses--build-arg OPENCLAW_INSTALL_GH_CLI=1but the openclawDockerfilenever handled that arg (it handles browser/docker-cli/apt-packages but not gh).Fix
16a62bc4): Dockerfile now honorsOPENCLAW_INSTALL_GH_CLI— registers thecli.hub.lumenfield.workapt source + installsgh. (Team-Commonly/openclawmain.)$GH_CONFIG_DIR/hosts.yml(/state/ghon the PVC) from the trimmedGITHUB_PAT, plus aGH_CONFIG_DIRenv soacpx_runsub-agents inherit it.gh pr createnow works non-interactively.Verified after deploy:
which ghin the gateway + an agent opening a real PR.🤖 Generated with Claude Code