Skip to content

feat(docker): the Harness images carry the GitHub CLI #288

Description

@teemow

Problem

A coding agent in a workspace Session works in its clone with git and the provider's CLI, as a person does on a laptop: it fetches, branches, commits, pushes, opens and reads pull requests. The Go ADK runtime image (go/Dockerfile) installs bash, ca-certificates and git, and the Claude harness image (go/harness/claude/Dockerfile) installs git and ripgrep; neither carries gh, so gh pr create, gh pr view or gh run list cannot run in a Session's sandbox on either Harness. The agent is left to hand-craft API calls or fails the task.

Proposed solution

Both images install the GitHub CLI from Alpine's github-cli package, pinned to one version in a build argument shared by the two Dockerfiles, for amd64 and arm64. No credential is baked in and none is configured: gh authenticates with whatever GH_TOKEN the runtime hands it, and in a workspace Session that is an inert placeholder the egress gateway replaces with the person's token (the caller credential mechanism of #147, selected per Session). The change is one carried commit on the fork line, recorded in FORK.md, and offered upstream as the Go ADK's and the Claude harness's Dockerfile change; if upstream declines it for the Go ADK image, the row becomes fork-only and says so.

Acceptance criteria

  • gh --version and git --version succeed through the bash tool in a Session's sandbox on the kagent Harness and on the claude Harness (fork e2e, both image architectures)
  • image-scan is green for both images and the PR states each image's size growth
  • The github-cli version is pinned once and Renovate (renovate.json5) tracks it
  • FORK.md row with the upstream pull request, or the fork-only verdict

Activity

  1. teemow commented on Oct 9, 2026

    @teemow
    MemberAuthor

    Agent-written note: this issue gives both Harness images gh (#308). An authenticated gh on the kagent Harness arrives with #290: the bash tool's carried environment allowlist withholds GH_TOKEN until #290 admits the inert egress placeholder. The Claude Harness is not affected by that allowlist.

  2. teemow commented on Oct 9, 2026

    @teemow
    MemberAuthor

    Agent-written note: delivered by #314 (rebase-merged as 2bb4601), released in v1.6.0-rc.1. Proof:

    • Fork e2e TestSessionShellRunsGitAndGitHubCLI passed on the kagent and claude Harnesses (gVisor lane, linux/amd64): gh --version && git --version through the shell tool, both versions asserted in the persisted tool response.
    • The published 1.6.0-rc.1 images golang-adk and claude-harness run gh version 2.97.0 and git version 2.54.0 on linux/arm64 (aarch64) and linux/amd64 (x86_64). CircleCI's amd64 and arm64 validate builds were green.
    • image-scan green; growth +45.1 MB (golang-adk) and +45.6 MB (claude-harness), uncompressed amd64.
    • One pin, go/github-cli.version; renovate.json5 tracks it through one custom.regex manager (Repology alpine_3_24/github-cli), validator --strict passes.
    • FORK.md row, queued upstream.
      An authenticated gh on the kagent Harness arrives with feat(adk): a secret-free bash environment with the turn's git identity #290.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions