Skip to content

Keepalive v2: turn “keepalive” into a real closed loop (Gate workflow_run -> Codex -> commit -> Gate -> repeat) #75

Description

@github-actions

Topic GUID: a7e4336a-0c86-5585-8e0c-373d60c8c0ca

Why

Context / problem:

  • Current keepalive does one round, then you manually click “Update Branch” (or create/merge a branch) in the Codex website to continue.
  • That manual step is the entire reason this doesn’t behave like a loop.
    Goal:
  • Implement a loop that is entirely GitHub-native:
    • Gate finishes -> if tasks remain -> Codex runs next task -> commit/push -> Gate reruns -> repeat
  • No Codex website clicking.
    Requirements:
  • Single label policy:
    • Only label needed: agent:codex
    • keepalive and autofix behavior controlled by a config block in PR body (written by Agents 63 bootstrap) or a repo-level default.

Tasks

  • Add a new workflow: .github/workflows/agents-keepalive-loop.yml
  • Trigger conditions:
  • on: workflow_run (workflows: ["Gate"], types: [completed])
  • optional: on pull_request labeled (agent:codex) to “start the loop”
  • Determine PR number from workflow_run payload
  • Fetch PR body and parse:
  • task list checkboxes
  • keepalive_enabled flag
  • autofix_enabled flag
  • iteration counter + max iterations
  • If Gate conclusion == success AND keepalive enabled AND tasks remain:
  • call reusable-codex-run with prompt keepalive_next_task.md
  • commit/push changes
  • post/update a single “Keepalive summary” comment (update-in-place)
  • Use concurrency:
  • group: keepalive-${{ pr_number }}
  • cancel-in-progress: false
  • Stop conditions:
  • tasks complete (all boxes checked) OR max iterations hit OR repeated identical failure
  • when stopping, add a label like needs-human (or post a loud comment) and exit

Acceptance criteria

  • A PR with a tasklist can advance multiple iterations without any manual Codex website interaction.
    • Gate green + tasks remaining reliably triggers the next iteration.
    • The loop stops safely and noisily when it can’t proceed.

Implementation notes

Not provided.


Synced by workflow run.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions