Skip to content

Prompt Tuning: kelos-config-update missing branch setup step β€” stale branch accumulates changes without rebasingΒ #924

@kelos-bot

Description

@kelos-bot

πŸ€– Kelos Self-Update Agent @gjkim42

Problem

The kelos-config-update TaskSpawner prompt lacks the branch setup step (git fetch --unshallow || true; git fetch origin main; git rebase origin/main) that all other PR-creating agents include. Because this agent uses a fixed branch name (kelos-config-update-latest), successive daily runs accumulate commits on a stale branch that is never rebased onto main.

Evidence

All other PR-creating agents have explicit setup steps:

Agent Setup Step
kelos-workers Step 0: git fetch --unshallow || true; git fetch origin main; git rebase origin/main
kelos-pr-responder Step 0: fetch + rebase (with upstream remote handling)
kelos-squash-commits Steps 1-2: fetch + checkout + git rebase origin/main
kelos-image-update git checkout -B <branch> origin/main (fresh branch from main)
kelos-config-update None β€” prompt starts directly with "1. Gather recent PR data"

Stale branch accumulation observed in practice:

PR #786 (kelos-config-update-latest) was created on 2026-03-24 but has continued accumulating commits without rebasing:

2026-04-03  Add new conventions from PR review feedback and sync worker agent
2026-04-04  Propagate conventions to all agents and add HTTP client timeout and l…
2026-04-05  Add meaningful test assertions convention from PR review feedback

The branch base is from March 24 β€” nearly 2 weeks behind main β€” while changes from 3 separate daily runs were pushed on top. Any files modified on main since March 24 are not reflected in this branch, risking stale modifications and merge conflicts.

Pre-fix history confirms the pattern:

Before issue #669 fixed the branch naming (from date-based to fixed kelos-config-update-latest), the agent created a new branch+PR every day, leaving 8+ stale open PRs (#729, #742, #619, #582, #569, #561, #652, #599, #662). The fixed branch name solved the duplication but introduced the stale-branch accumulation problem because the same branch is now reused without rebasing.

Proposed Fix

Add a Step 0 to the kelos-config-update prompt template in self-development/kelos-config-update.yaml, matching the pattern used by other PR-creating agents:

Task:
0. **Set up your working branch.** Run this exactly:

git fetch --unshallow || true
git fetch origin main
git rebase origin/main


1. **Gather recent PR data**
...

This ensures the agent always starts from an up-to-date main, preventing stale modifications and merge conflicts.

Scope

  • File: self-development/kelos-config-update.yaml (prompt template only)
  • One-line change: add the setup step before the existing step 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions