Skip to content

squad doctor reports false failures for a linked (remote team root) project #2056

Closed

Description

@ashtewari

CLI version: squad v0.12.0
Date: 2026-09-10
Platform: Windows (PowerShell)

SUMMARY

When a project is linked to a central/remote team root via squad link
(dual-root / remote mode), squad doctor correctly resolves the team root but
then validates the team STATE files against the LOCAL .squad/ directory
instead of the resolved remote team root. Because a linked project's local
.squad/ only contains config.json, doctor falsely reports the shared team's
files as missing.

The team itself is fully functional in this configuration — squad status and
squad cast both resolve and read the shared team correctly. Only squad doctor misreports.

ENVIRONMENT / LAYOUT

Central team root (real team lives here):
C:\Users\user1\root.squad
team.md, routing.md, agents/, casting/, decisions.md, config.json, ...

Linked service project:
C:\Users\user1\root\testsvc
.squad\config.json -> { "version": 1, "teamRoot": "..", "projectKey": null }
.github\agents\squad.agent.md

REPRO STEPS

  1. Have an initialized team at a central root (e.g. C:\Users\user1\root.squad).
  2. In a separate project folder:
    cd C:\Users\user1\root\testsvc
    squad link C:\Users\user1\root
    -> writes .squad/config.json with "teamRoot": ".."
  3. Run:
    squad doctor

EXPECTED

Because the team root resolves to C:\Users\user1\root (which contains a valid
.squad/ with team.md, routing.md, agents/, casting/registry.json, decisions.md),
doctor should validate those state files against the RESOLVED team root and
report them as present.

ACTUAL

Mode: remote

[PASS] .squad/ directory exists
[PASS] config.json valid
[PASS] team root resolves -> resolved to C:\Users\user1\root
[FAIL] team.md found with ## Members header -- file not found
[FAIL] routing.md found -- file not found
[FAIL] agents/ directory exists -- directory not found
[FAIL] casting/registry.json exists -- file not found
[FAIL] decisions.md exists -- file not found

Summary: 6 passed, 5 failed (the 5 failures are false negatives)

Contrast (same project, same moment):

  • squad status -> resolves the active squad.
  • squad cast -> lists all 7 shared agents from the central root
    (Engineer, Fact Checker, Lead, Rai, ralph, Scribe, Tester).
    So the team genuinely resolves; only doctor misreports.

Activity

  1. bradygaster commented on Sep 23, 2026

    @bradygaster
    Collaborator

    Closing as resolved — runDoctor() now resolves stateDir before checking team.md/routing/agents (packages/squad-cli/src/cli/commands/doctor.ts:724-730), and test/effective-squad-dir.test.ts:131-143 verifies linked projects read state from the remote team root. The false-failure behavior described here no longer reproduces against current code.

  2. added a commit that references this issue on Oct 2, 2026
    67d9ed0
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