Skip to content

squad init: Squad init should not run git init in a sub-folder of a repository (or ever) #939

Closed

Description

@serbrech

We use a monorepo.
I've tried to setup squad in the folder that my team works in.
squad init detected that we're not at the root, warned about it, and then ran git init in the folder

Expectation:
don't run git init.

Copilot resolves .github/agents/ from the git root, not from here.
The Squad agent won't be visible to copilot in this folder.
 
→ Running git init to create a repo boundary...
✓ Initialized git repo at /home/<user>/code/<repo-root>/<folder>

Activity

  1. nirmitnd commented on Apr 9, 2026

    @nirmitnd

    +1 to this. Even I use monorepo and the git init tripped me. The documentation also doesn't clearly mention that git init will be run.

  2. tamirdresher commented on Apr 9, 2026

    @tamirdresher
    Collaborator

    Agreed — \git init\ should never run here. Filed PR #944 with a fix: splits file placement (agent file at git root, .squad/ in subfolder), enables multiple squads per monorepo, and adds CWD-first resolution. See the PR for full details.

  3. tamirdresher commented on Apr 9, 2026

    @tamirdresher
    Collaborator

    Update: Workflow placement gap found during E2E testing

    PR #944 fixes the core issue (no more git init, split file placement works), but a review found a gap: GitHub Actions workflow files are placed in the subfolder in monorepo mode, where GitHub can't find them.

    Options being discussed on the PR:

    1. Skip workflows entirely in monorepo-subfolder mode (multiple squads would conflict anyway)
    2. Place at git root (but which squad's workflows win?)
    3. Merge workflows intelligently (complex)

    See PR #944 comment for details. Would appreciate input on the preferred approach.

  4. added a commit that references this issue on Apr 9, 2026
    29bded6
  5. added a commit that references this issue on Apr 12, 2026
    e49d9c9
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions