Skip to content

fix(implementation): parallel workers collide on shared scratchpad script names #6631

Closed

Description

@kyle-sexton

Observed 2026-10-07: workers dispatched in parallel share one session scratchpad. Three times a worker ran another worker's leftover bump.py from that scratchpad, because the names matched, and edited the wrong plugins' versions. One of those runs left uncommitted edits in another worktree. In each case the worker or the user had to revert by hand.

Proposal: the implementation:implement-dispatch brief and the implementer agents should require scratch files to be named <branch>-<purpose>, and should forbid running a scratch script the worker did not write in this task. Also consider a per-worker scratch subdirectory.

Acceptance: the brief template and the agent bodies state the rule. One line is enough; this is an observed stumble under the instruction-economy rule.

Activity

  1. added
    needs-triage
    on Oct 8, 2026
  2. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    Thanks for the report. I understand this as: parallel implementation workers share one session scratchpad, and three times a worker executed another worker's leftover bump.py (name collision) rather than its own, causing wrong-plugin version edits and once leaving uncommitted changes in another worktree that had to be reverted by hand.

    The proposal is clear and narrowly scoped: have the implementation:implement-dispatch brief and the implementer agent bodies state a rule that scratch files are named <branch>-<purpose>, and that a worker must not run a scratch script it did not write in the current task, with a per-worker scratch subdirectory as an additional option to consider.

    I didn't find an exact duplicate issue, though #5764 (parallel phase dispatch) and #6182 (scratch-dir session cleanup) are related context, not the same bug. No reproduction steps beyond the incident description are included, but given the acceptance criteria are concrete, that doesn't block action.

    Automated triage. A maintainer reviews it.

  3. added
    good first issue
    on Oct 8, 2026
  4. removed
    needs-triage
    on Oct 12, 2026
  5. added theissue type on Oct 12, 2026
  6. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The owner approved applying independently verified recommendations (confirmed, low-risk set) on 2026-10-13.

    • Which fix: a naming-and-ownership rule only, or also a per-worker scratch subdirectory? → Rule only: name scratch files - and never run a scratch script you did not write in this task
      Basis: fix(implementation): parallel workers collide on shared scratchpad script names #6631 body (acceptance: 'One line is enough'); docs/plugin-philosophy.md#instruction-economy (AGENTS.md Code Review Rules); git grep scratch on origin/main plugins/implementation: no rule in implement-dispatch/SKILL.md or agents/implementer.md, scoped-implementer.md

    Parallel implementation workers share a session scratchpad and three times ran another worker's leftover bump.py, editing the wrong plugins. The issue asks for a one-line rule in the dispatch brief and implementer agents; nothing on main mentions the scratchpad yet.

    Verification notes:

    • Evidence 'only reference/artifact-protocol.md:25' is incomplete: implement/SKILL.md:257 also mentions scratch scripts (not committing them as tests); neither states the collision rule, so the finding holds.

    Verified by an independent fresh-context check (confirmed, risk low): gh issue view 6631 (OPEN); git grep -i scratch origin/main plugins/implementation; origin/main plugins/implementation/agents/implementer.md:28 'The brief is the contract'; gh pr view 7045: MERGED; gh pr list 'scratchpad worker': no fix PR

    Admission to an agent lane stays with the work-class rules and owner ratification.

  7. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Agent Brief

    Type: Bug
    Summary: Tell parallel implementation workers to name their scratch files <branch>-<purpose> and never run a scratch script they did not write in this task.

    Current behavior:
    Workers dispatched in parallel share one session scratchpad. Nothing in the dispatch brief or the implementer agent bodies says how to name scratch files or forbids running another worker's leftover script, so three times a worker ran another worker's bump.py and edited the wrong plugins.

    Desired behavior:
    The brief template in /implementation:implement-dispatch and both implementer agent bodies (implementer, scoped-implementer) state one rule: scratch files are named <branch>-<purpose>, and a worker never runs a scratch script it did not write in the current task. One line each; no per-worker subdirectory mechanism.

    Key interfaces:

    • The implement-dispatch worker brief template: gains the rule.
    • The implementation:implementer and implementation:scoped-implementer agent instructions: gain the same rule.

    Acceptance criteria:

    • The implement-dispatch brief template states the naming rule and the never-run-another-worker's-script rule.
    • Both implementer agent bodies state the same rule.
    • No per-worker scratch subdirectory is introduced.
    • An implementation changelog fragment is added and scripts/check-changelog-fragments.sh passes.
    • CI's check-skills passes on the PR.

    Out of scope:

    • A per-worker scratch subdirectory or any tooling that enforces the rule.
    • Other implementation skills and agents.
    • Cleaning up existing scratchpads.

    This was generated by AI during backlog shaping. Held, not admitted: this brief is drafted and checked, but the issue lane would stop on it today. It is admitted, by adding agent-ready, once the lane can run the skill-quality check scripts (Automation Lanes' PR #7912). Held under the owner's 2026-10-18 lane-narrowing course correction.

  8. added
    needs-human
    agent-ready
    and removed
    needs-human
    on Oct 18, 2026
  9. melodic-automation-lanes commented on Oct 18, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed before it reported, or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. It does this once per version of those files, so if this run fails the same way, a person looks at it.

  10. added
    agent-ready
    and removed
    agent-ready
    on Oct 18, 2026
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

    agent-readygood first issue

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions