Skip to content

fix(scripts): create agent slots from origin/main, not the removed dev branch - #531

Merged
Leo310 merged 2 commits into
mainfrom
fix/setup-slots-origin-main
Sep 27, 2026
Merged

Leo310 merged 2 commits into
mainfrom
fix/setup-slots-origin-main

Conversation

@Leo310

@Leo310 Leo310 commented Sep 27, 2026

Copy link
Copy Markdown
Member

What

bun run setup-slots failed with fatal: invalid reference: dev whenever it had to (re)create a slot worktree. The repo is main-only now. The script now runs git fetch origin main once and creates missing slots from origin/main. It also runs git worktree prune before worktree add, so a slot directory deleted by hand (which leaves a stale registration behind) can be recreated. The dispatch skill's post-merge git pull --ff-only origin dev now pulls main too. claim-slot.sh, release-slot.sh and AGENTS.md "Parallel agent slots" had no stale dev references (AGENTS.md already says origin/main).

How I tested it

Scripts only, no plugin code. bash -n on the script. Replayed the worktree step against a scratch path: created a worktree from origin/main, deleted its directory, and confirmed worktree add fails without the prune and succeeds with it. Existing slots are untouched: the -d "$worktree" guard is unchanged, so the script stays idempotent. I did not re-run the full script because all three slots are currently claimed and it would rebuild them.

AI assistance: Claude Code wrote the change from Leo's brief to fix the stale dev reference in setup-slots; Leo reviews it.

Checklist

  • bun run check, bun run format, bun run lint, and bun run test pass locally (n/a: no TS/Svelte touched)
  • I tried the change in a real Obsidian vault (or explained above why that isn't applicable)
  • I read CONTRIBUTING.md, including the section on AI assistance
  • If this adds a provider, a bundled skill, a built-in tool, or changes manifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md)

…v branch

setup-agent-slots.sh still created missing slot worktrees from `dev`, which
no longer exists, so recreating a slot failed with "invalid reference: dev".
Fetch origin/main once up front and create slots from it. Also prune stale
worktree registrations first so a slot directory deleted by hand can be
recreated. The dispatch skill's post-merge pull pointed at dev as well.

Co-Authored-By: Claude <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Updates agent slot setup to use main branch instead of dev.

The PR appears safe to merge; the previously reported fetch failure for existing-slot maintenance is fixed.

Summary

The PR creates missing agent slots from origin/main, prunes stale worktree registrations before recreation, and updates the dispatch skill’s post-merge pull to use main. The follow-up change fetches only when a slot needs creating, preserving offline maintenance of existing slots.

Reviews (2) · Last reviewed commit: "fix(scripts): only fetch origin/main whe..."

Comment thread scripts/setup-agent-slots.sh Outdated
Re-running setup-slots over existing slots must keep working offline.

Co-Authored-By: Claude <noreply@anthropic.com>
@Leo310
Leo310 merged commit da904a4 into main Sep 27, 2026
3 checks passed
@Leo310
Leo310 deleted the fix/setup-slots-origin-main branch September 27, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant