Skip to content

Build the kagent lane's Claude harness image with the engineer's tools #4867

Description

@devantler

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Part of #4866.

Goal

Build the lane's runtime image: kagent's Claude Code harness plus the tools a normal Agentic Engineer run uses, so the agent is fully tooled inside its sandbox.

Acceptance criteria

  • The image extends the released kagent Claude harness image and adds the tools the contract's scripts and skills call (for example gh, git, jq, Go yq, kubectl, ksail, flux, Go and Node), each pinned.
  • CI builds, scans, signs and publishes it to GHCR, and the platform references it by @sha256: digest, as kagent requires.
  • A smoke check runs the contract's pre-flight scripts inside the image and they exit cleanly on Linux, not only on the macOS host.
  • Dependency automation keeps the base image and tools current.

🤖 Generated with Claude Code

Activity

  1. added theissue type on Nov 7, 2026
  2. moved this to 🫴 Ready in 🌊 Project Boardon Nov 7, 2026
  3. devantler-tech-engineering commented on Nov 11, 2026

    @devantler-tech-engineering

    🤖 Generated by the Agentic Engineer

    Field evidence from the kagent lane's first in-sandbox run (2026-11-11 UTC). The lane-store lease, memory restore and GitHub access all worked; the run then failed closed at pre-flight, because every contract guard exited 2 (UNKNOWN) in the current image. No portfolio work was done.

    The image is Alpine with BusyBox coreutils. What each guard reported:

    Guard Result Cause
    plugin-definition-currency.sh --runtime claude exit 2 BusyBox timeout rejects --kill-after
    memory-hygiene.sh --layout legacy exit 2, "failed to build Go guard" same timeout flag; no go toolchain
    disk-preflight.sh exit 2, "implausible free space" the sandbox filesystem reports ~8 EiB free via df
    lane-draft-count.sh --lane kagent exit 2, listing unreadable (likely the same GNU-only tooling; gh api itself works)
    platform-live-health.sh exit 2 kubectl not on PATH
    review-lane-health.sh exit 2 BusyBox date rejects -d '7 days ago'

    Present: bash, git, gh, jq, yq, curl. Missing: GNU coreutils (timeout, date), go, kubectl, flux, node.

    This adds three things to the acceptance criteria above:

    • GNU coreutils (Alpine coreutils package) belongs in the tool list, not only Go and kubectl. The scripts rely on GNU timeout --kill-after and date -d.
    • The disk guard needs a sandbox-aware answer. It reads the reported free space as implausible, which is correct behaviour, so this should be fixed in the image or its mounts, not by loosening the guard.
    • The smoke check in the third criterion would have caught all six failures. These six commands are a ready-made list for it.
  4. devantler-tech-engineering commented on Nov 12, 2026

    @devantler-tech-engineering

    🤖 Generated by the Agentic Engineer

    Follow-up from the kagent lane's 2026-11-12 run, the first on the image from devantler-tech/platform#6144. The run failed closed at pre-flight again, so it did no portfolio work. The new image fixed most of what the first report found: GNU timeout and date, kubectl and go are present now, and platform-live-health.sh exits 0. Two gaps are left:

    1. Go is too old for the Go guards. scripts/kagent-claude-harness/Dockerfile installs Go with apk add go, which gives Alpine's go 1.24.13. The monorepo's .claude/scripts/*-go modules need go >= 1.26.11. Go can't download a newer toolchain at run time, because the sandbox can only reach GitHub, the model, the lane store and the cluster view. So every guard that builds a Go helper exits 2:

      • memory-hygiene.sh ("failed to build Go guard"). Its exit 2 means stop.
      • plugin-definition-currency.sh
      • lane-draft-count.sh, through blocked-label-blocker-line.sh read. Plain gh api reads of the same endpoints work.

      A likely fix is to install Go from a pinned upstream release instead of the Alpine package, for example COPY --from=golang:<1.26.x>-alpine@sha256:… /usr/local/go /usr/local/go, with a build-time check that go version meets the monorepo's highest go directive. The other option is to make the toolchain reachable through the egress gateway.

    2. disk-preflight.sh still says UNKNOWN, because gVisor's df reports about 8 EiB free. This needs a guard-side or sandbox-side answer. It has not changed since the first report.

    review-lane-health.sh exited 1 because of upstream reviewer limits (CodeRabbit is rate-limited and Codex has hit its usage limit). That is outside this lane.

  5. devantler-tech-engineering commented on Nov 13, 2026

    @devantler-tech-engineering

    🤖 Generated by the Agentic Engineer

    Follow-up from the kagent lane's 2026-11-13 run. Since the 2026-11-12 report, the pre-flight has changed like this:

    Guard 2026-11-12 2026-11-13
    go version 1.24.13 1.27.4 (the guards' go.mod needs >= 1.26.11)
    memory-hygiene.sh --layout legacy 2 0
    lane-draft-count.sh --lane kagent 2 0 (WITHIN, 0 drafts)
    platform-live-health.sh 0 0
    plugin-definition-currency.sh --runtime claude 2 2: no installed_plugins.json registry in the image. With --installed /opt/agent-plugins/agentic-engineering it exits 0, CURRENT: all 302 pinned files match the gitlink
    disk-preflight.sh 2 2 (unchanged)

    So gap 1 (Go) is fixed. The currency check works once it is given the image's install path. The lane's invocation needs that flag, or the image needs a registry file the check can read.

    disk-preflight will not reach exit 0 in this sandbox, even after a mount fix. The workspace volume is a tmpfs mounted without a size, which is why df reports about 8 EiB. Its real ceiling is the runtime's memory limit (runtimeDefaults.memory: 4Gi in the kagent release). The guard needs 20 GB free. A sized tmpfs would therefore turn UNKNOWN into exit 1 (LOW), not 0. The guard is correct to refuse heavy work here: builds, test suites and local clusters do not fit in 4 GiB of shared memory and disk.

    That leaves a scope decision for this lane, not a guard bug. Either it stays API-only (survey, triage, reviews, issues, and small commits through createCommitOnBranch, with CI as the execution surface), which the guard already enforces, or its runtime gets a real disk-backed workspace and more memory. Lowering the guard's threshold for this lane would weaken a control, so this report does not propose it.

    Today's run stayed API-only and opened no drafts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions