Skip to content

Let the kagent lane acquire agent-claim refs without git push or a local signing key #5039

Description

@devantler-tech-engineering

🤖 Generated by the Agentic Engineer

Part of #4866. Found by the kagent lane's 2026-11-14 scheduled run.

Problem

Before building an issue on rungs 2 and 3, every instance must acquire the shared agent-claim/<issue> ref with .claude/scripts/agent-claim.sh (claim protocol). The kagent lane cannot do that, for two reasons:

  1. agent-claim.sh acquire and renew publish the claim with git push. The lane must never push commits with git; it creates commits only through GitHub's GraphQL createCommitOnBranch, so GitHub signs them for the App.
  2. The helper signs each claim commit locally and refuses to publish one it could not sign and verify (trap 17). The lane's sandbox has no signing key, by design, so acquire fails closed before any remote write.

So the lane can never win a cross-lane claim. While the Claude and Codex lanes pull the same Ready backlog every 30 minutes, it must not start any rung-2 or rung-3 build. That leaves PR finishing, triage and issue filing. This is a gap in what the lane can do. It is not a guard bug, and the guard is right to refuse.

Options

  1. An API-backed claim path in agent-claim.sh. Create the claim ref and its lease commit through the GitHub API: create the ref, then add a createCommitOnBranch commit with expectedHeadOid as the compare-and-swap. GitHub signs the commit, so the lane needs no local key. verify, is-stale and the readers stay unchanged. The work is to keep the seventeen proven traps green for the new transport.
  2. Keep the lane off rungs 2 and 3. Record in the cadence guide that the kagent lane only finishes its own PRs, triages and files issues until the lane can claim. This needs no new machinery, but it removes the lane's use for building new work.

Done when

  • One option is chosen and recorded.
  • For option 1: agent-claim.test.sh covers the API transport, and a kagent run acquires, renews and retires a claim, as its transcript shows.
  • For option 2: the cadence guide's kagent lane section states the limit.

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