Skip to content

bug: Squad coordinator silently drops in long sessions (context overflow) #1017

@obit91

Description

@obit91

Problem

When sessions grow long, the ~84KB squad.agent.md coordinator file can be silently dropped from <available_skills> due to context budget pressure from large session summaries or conversation history. When this happens, Squad degrades to a vanilla Copilot agent with no safety rails and no warning.

Symptoms

  • No agent routing — the coordinator stops dispatching to squad members
  • Commits pushed directly to main (no branches, no PRs)
  • No branch naming conventions followed
  • No reviewer gates or approval workflow
  • Session feels like "standard GitHub Copilot" with no squad awareness
  • No error message — the failure is completely silent

Root Cause

The coordinator file (squad.agent.md) is ~84KB. The Copilot platform loads skills from <available_skills> at session start, but the available context budget shrinks when:

  1. A prior conversation was long, producing a large session summary
  2. The session summary is injected at the start of the new conversation
  3. The compressed context budget can no longer fit the 84KB coordinator

When the coordinator doesn't fit, it's simply omitted from <available_skills>. The session starts without it, and the default Copilot CLI agent takes over — silently, with no indication that Squad failed to load.

Why It's Silent

There is no "Squad failed to load" message. The <available_skills> block just has fewer entries, and nothing in the platform or the remaining instructions tells the agent that the coordinator is missing. The copilot-instructions.md file (~3KB) is always loaded since it's base instructions, but it contained no check for the coordinator's presence.

Impact

This is a safety issue. Squad's value proposition includes enforced PR workflows, branch protection, reviewer gates, and agent routing. When the coordinator drops silently, all of these protections vanish without warning, potentially leading to:

  • Direct pushes to protected branches
  • Unreviewed code changes
  • Loss of team decision tracking
  • No orchestration logging

Reproduction

  1. Use Squad in a long session (many turns, complex multi-agent work)
  2. End the session
  3. Start a new session — the platform injects a large session summary
  4. Observe that squad members are never spawned and the agent behaves as vanilla Copilot

Proposed Fix

See PR #1016 which implements two complementary solutions:

  1. Sentinel check in copilot-instructions.md — detects missing coordinator and warns loudly
  2. Size reduction of squad.agent.md from ~84KB to ~55KB (33% smaller) via content extraction to on-demand reference files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions