Skip to content

[Bug]: collaborator cache not refreshed on schedule-triggered runs #3352

Description

@la14-1

Context

Follow-up from #3351. The prompt-level collaborator filters added there rely on /tmp/spawn-collaborators-cache already existing. On a schedule-triggered run (where SPAWN_ISSUE is unset), that cache may be stale or missing entirely, because:

  • refactor.sh / security.sh / qa.sh source collaborator-gate.sh, but only call is_collaborator when SPAWN_ISSUE is set
  • is_collaborator is what triggers _refresh_collaborator_cache
  • So on schedule runs, the cache is never warmed before Claude starts — and the jq filter in each prompt returns an empty list

Failure mode

Strictly safer than the alternative (empty list vs. prompt-injection risk), so this is not a security regression. But it means on cold schedule runs the bots see zero issues/PRs and do nothing useful until the cache is warmed some other way.

Fix

In refactor.sh, security.sh, and qa.sh, unconditionally call _refresh_collaborator_cache right after sourcing collaborator-gate.sh — before Claude spawns. Something like:

if [[ -f "${GATE_SCRIPT}" ]]; then
    source "${GATE_SCRIPT}"
    _refresh_collaborator_cache  # warm before Claude runs
fi

This makes every run, scheduled or issue-triggered, start with a fresh (or cache-valid) collaborator list.

Related

Filed from Slack by SPA

Activity

  1. added
    bugSomething isn't working
    pending-reviewIssue awaiting initial review
    on Apr 24, 2026
  2. la14-1 commented on Apr 24, 2026

    @la14-1
    CollaboratorAuthor

    Acknowledged. This is a valid bug — the collaborator cache can go stale on schedule-triggered runs since it's only warmed at service start.

    The fix requires changes to .claude/skills/setup-agent-team/refactor.sh, .claude/skills/setup-agent-team/security.sh, and .claude/skills/setup-agent-team/qa.sh, which are off-limits for automated processing (bot infrastructure). This needs manual review and implementation.

    -- refactor/community-coordinator

  3. added
    under-reviewIssue is being reviewed by the team
    in-progressIssue is being actively worked on
    and removed
    pending-reviewIssue awaiting initial review
    under-reviewIssue is being reviewed by the team
    on Apr 24, 2026
  4. la14-1 commented on Apr 24, 2026

    @la14-1
    CollaboratorAuthor

    Related issue filed for the infrastructure boundary blocker: #3354 (labeled needs-human-review). The cache staleness fix is blocked until a human addresses the off-limits files.

    -- refactor/community-coordinator

  5. la14-1 commented on Apr 25, 2026

    @la14-1
    CollaboratorAuthor

    The fix for this issue requires modifying refactor.sh, security.sh, and qa.sh inside .claude/skills/setup-agent-team/, which is off-limits for automated agents. The change itself is straightforward — unconditionally call _refresh_collaborator_cache right after sourcing collaborator-gate.sh in each script — but it needs to be applied manually.

    -- refactor/code-health

  6. la14-1 commented on Apr 30, 2026

    @la14-1
    CollaboratorAuthor

    Update: The fix in .claude/scripts/collaborator-gate.sh is NOT off-limits. The off-limits rule applies only to .claude/skills/setup-agent-team/*, .github/workflows/*.yml, and CLAUDE.md. The scripts directory (.claude/scripts/) is editable by automated agents.

    Delegating to code-health teammate for implementation.

    -- refactor/community-coordinator

  7. la14-1 commented on Apr 30, 2026

    @la14-1
    CollaboratorAuthor

    Fix in #3375.

    -- refactor/team-lead

  8. la14-1 commented on May 2, 2026

    @la14-1
    CollaboratorAuthor

    Tracked — fix is in progress in PR #3375.

    -- refactor/community-coordinator

  9. added a commit that references this issue on May 3, 2026
    bf91f4f
  10. la14-1 commented on May 7, 2026

    @la14-1
    CollaboratorAuthor

    Fix in #3375.

    -- refactor/community-coordinator

  11. la14-1 commented on May 7, 2026

    @la14-1
    CollaboratorAuthor

    Fix in #3375.

    -- refactor/community-coordinator

  12. added a commit that references this issue on May 9, 2026
    12c000f
  13. la14-1 commented on May 9, 2026

    @la14-1
    CollaboratorAuthor

    Fix in progress: #3375

    -- refactor/community-coordinator

  14. added 3 commits that reference this issue on May 11, 2026
    802b5f2
    1aa56b8
    807c143
  15. la14-1 commented on May 14, 2026

    @la14-1
    CollaboratorAuthor

    Fix in #3375.

    -- refactor/community-coordinator

  16. added a commit that references this issue on May 21, 2026
    705cd06
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

    bugSomething isn't workingin-progressIssue is being actively worked onunder-reviewIssue is being reviewed by the team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions