Skip to content

source-control:babysit-prs: Worker Contract has the same worktree-cwd-persistence gap #566 fixed in implement-dispatch #704

Closed

Description

@kyle-sexton

Lane: work (issue-execution loop) · Category: operational (correctness/safety gap)

Triggering example

PR #702 (closes #566) fixed plugins/implementation/skills/implement-dispatch/SKILL.md's "Compose the brief" step: the Bash tool's cwd does not reliably persist across separate tool calls in this environment despite its docs claiming it does, so a worker briefed to cd once into an out-of-tree worktree can silently drift back to the canonical checkout on a later call. The fix requires every worktree-scoped brief to give the worktree's absolute path and mandate git -C <path> (or re-cd every call) instead of trusting a one-time cd.

The dispatching worker for #566 identified that plugins/source-control/skills/babysit-prs/'s Worker Contract hands a worker a worktree path the same way and has the identical gap, but did not fix it there because open PR #665 already bumps source-control's plugin.json (and was conflicting with main at the time) — bumping it again from this PR would have raced that manifest per the version-bump-from-current-main convention.

Observed vs expected

  • Observed: source-control:babysit-prs's Worker Contract does not warn against relying on cwd persistence when handing a worker a dedicated worktree.
  • Expected: same mitigation as docs(implementation): require worktree-cwd clause in dispatch briefs #702/implement-dispatch — absolute worktree path + explicit "never trust a one-time cd" instruction, git -C <path> or re-cd per call.

Suggested fix

Apply the same one-line-ish mitigation to plugins/source-control/skills/babysit-prs/'s Worker Contract section once #665 merges (or fold into #665 directly if still open and convenient). See #702's diff to implement-dispatch/SKILL.md for the exact wording pattern to mirror.

Related

#566, PR #702, #665 (source-control version-file occupancy blocking this)

Work-class: C3 (bug-fix-shaped) — attended triage 2026-07-23, operator-ratified. 🤖

Activity

  1. added
    agent-ready
    needs-human
    on Jul 23, 2026
  2. kyle-sexton commented on Jul 24, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI on operator direction.

    Superseded — this item was already ratified and should not have been queued.

    The earlier first-drain ratification request on this issue was raised in error. The admission gate dispatches a C3 bug-fix-shaped item when it carries either its own recorded ratification or a completed first drain — and this issue already carried recorded ratification in its body from attended triage on 2026-07-23. The drain cycle applied the blanket first-drain rule without first reading bodies for an existing ratification, so it queued an item that was already admitted.

    Restored to the autonomous frontier: agent-ready re-applied, needs-human removed. No human action is required, and this issue no longer appears in the attended queue's ratify view.

  3. added
    agent-ready
    and removed
    agent-ready
    needs-human
    on Jul 24, 2026
  4. self-assigned this
    on Jul 25, 2026
  5. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor
    No description provided.
  6. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI on operator direction.

    Claimed and executed by the /work-items:work-loop autonomous drain lane (cycle 2). Admission gate and this item's recorded ratification cleared before dispatch; the interactive confirmation was satisfied by that admission decision.

    PR: #1299 (Closes #704). Not merged — merge authority belongs to a separate lane.

    The mitigation landed in plugins/source-control/skills/babysit-prs/reference/orchestration.md (Worker Contract + Worker Prompt Template) only, not SKILL.md: that file is at 499/500 lines against check-skill.sh's hard cap, so the Gotchas half of #702's two-surface pattern would not fit. Filed as #1297.

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

Metadata

Metadata

Assignees

Labels

agent-ready

Type

Fields

No fields configured for Task.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions