Skip to main content

5 posts tagged with "squad"

View All Tags

GitHub Copilot: From Basics to AI Agents

Β· 22 min read

Watercolor illustration of a woodworker in blue meeting his first AI helper in green at a furniture workshop

Imagine a furniture workshop. You're the craftsperson in the blue shirt β€” the one with the vision, the taste, the final say. The helpers in green shirts? Those are your AI agents. At first there's just one, handing you the right chisel at the right moment. By the end of this journey, you'll have a whole crew in green building furniture to your specifications while you direct, decide, and review.

A year ago, I was tab-completing function signatures. Today, I manage a team of named AI agents that handle PR reviews, documentation sweeps, and infrastructure audits.

That sounds like a sales pitch. It's not. It's a progression that happened one level at a time, each building on the last. And the best part? You can start the same journey in about 15 minutes.

Here's the path I took β€” four levels, from "ooh that's cool" to "wait, this changes everything."

The TL;DR​

LevelWhat ChangesTime to Value
1. First DayYou get an AI pair programmer (IDE + CLI)15 minutes
2. Making It YoursCopilot learns YOUR codebase (instructions, MCPs, skills)1-2 hours
3. SquadA team of agents working in concert1 day
4. Autonomous OpsFully defined work executes itself2-3 days

Each level builds on the previous one, and each is independently useful. Once you see what's possible at each stage, you'll want to keep climbing.

Badge legend: πŸ–₯️ VS Code Β· ⌨️ CLI Β· πŸ‘€ Interactive Β· πŸ€– Autonomous Β· πŸ’» Local Β· ☁️ Cloud Β· 🌐 GitHub.com


Level 1: Your First Day with Copilot​

πŸ–₯️ VS Code Β· ⌨️ CLI Β· πŸ‘€ Interactive Β· πŸ’» Local

Watercolor illustration of a blue-shirted craftsperson at the workbench while a green-shirted helper steadies the joint

Your first day in the workshop. You're at the bench with your mallet (blue shirt), fitting a dovetail joint. Your one helper in green steadies the piece, hands you the right tool before you ask, and suggests a better angle β€” but you swing the mallet.

This is where everyone starts β€” and honestly, where most of the immediate productivity gains live. Level 1 spans two environments: Copilot in your IDE (VS Code, JetBrains, etc.) and the standalone Copilot CLI in your terminal.

In the IDE: Inline Completions & Inline Chat​

πŸ–₯️ VS Code Β· πŸ‘€ Interactive Β· πŸ’» Local

Inline completions β€” the thing most people think of as "Copilot." You type, it suggests. But it's more than autocomplete. It reads your open files, your comments, your function signatures, and generates contextually aware suggestions. This happens directly in your editor as you type.

Inline chat β€” highlight code, press Ctrl+I, ask a question. "Explain this regex." "Refactor this to use async/await." "Add error handling." It edits in place within the current file.

In the IDE: Copilot Chat Panel​

πŸ–₯️ VS Code Β· πŸ‘€ Interactive Β· πŸ’» Local

The Chat panel (Ctrl+Shift+I or the sidebar) opens a conversation with Copilot that has broader awareness:

  • Open file context β€” ask questions about the file you're looking at: "What does this function do?" "Find the bug in this logic."
  • @workspace β€” ask about the entire repository: "Where is authentication handled?" "Show me all API routes." Copilot searches across your project.
  • @terminal β€” get help with shell commands without leaving the IDE: "How do I find large files?" "What's the git command to squash commits?"
  • Agent mode β€” Copilot Chat also has an "agent" mode where it can make multi-step edits, run terminal commands, and iterate. This is powerful for IDE-based workflows, but note: this is different from the Squad "agents" discussed later. Agent mode is a single AI working iteratively; Squad agents are specialized team members working in concert.

The Standalone Copilot CLI​

⌨️ CLI Β· πŸ‘€ Interactive Β· πŸ’» Local

The copilot command brings the full Copilot agent to your terminal β€” file editing, shell commands, sub-agents, and more:

# Non-interactive prompt mode:
copilot -p "extract a .tar.gz file preserving permissions"

# Ask about git:
copilot -p "undo my last commit but keep the changes"

# Start an interactive session:
copilot

The standalone CLI (copilot) is a full agent runtime β€” it can read/write files, run commands, and orchestrate complex tasks from your terminal. It's distinct from the IDE chat panel but equally powerful.

When to Use Each​

ContextBest For
Inline completionsFlow-state coding, writing new functions
Inline chat (Ctrl+I)Quick edits to selected code
Chat panel (open file)Understanding code you're reading
Chat panel (@workspace)Finding things across a project
Chat panel (@terminal)Shell command help inside IDE
Agent mode (IDE)Multi-step edits within a project
copilot CLITerminal-first workflows, scripting, automation

Try This Now​

  1. Install GitHub Copilot in VS Code
  2. Open any project, start a new file, write a comment:
// Parse a CSV string into an array of objects using the first row as headers

Copilot will generate the implementation. Tab to accept.

  1. Install the standalone Copilot CLI and try:
copilot -p "explain why this Node.js app leaks memory when processing large CSV uploads"

What I Learned at Level 1​

The biggest gain wasn't the code generation β€” it was the velocity shift in unfamiliar territory. Working in a language I don't know well? Copilot bridges the gap between "I know what I want" and "I know the syntax." It turned 30-minute research into 30-second completions.

The limitation: Copilot at this level generates generic best-practice code. It knows nothing about your specific conventions or preferences. That leads to ...


Level 2: Making Copilot Yours​

πŸ–₯️ VS Code Β· ⌨️ CLI Β· πŸ‘€ Interactive Β· πŸ’» Local

Watercolor illustration of a blue-shirted craftsperson alone, setting up custom jigs and labeled drawers

No green shirts in sight β€” this is setup time. You're alone at the bench, labeling drawers, building custom jigs, and pinning reference cards to the pegboard. You're not building furniture yet; you're building the system that makes your workshop uniquely yours. When the green-shirted helpers return, they'll know exactly where everything goes.

Level 1 Copilot is smart but generic. Level 2 is where it starts feeling like a teammate who's read your wiki. This level works in both the IDE and CLI β€” the same instruction files and MCP configs are picked up by Copilot Chat in the IDE and Copilot CLI.

Custom Instruction Files​

Drop instruction files in your repo and Copilot learns your conventions:

.github/copilot-instructions.md β€” global instructions for all Copilot interactions:

# Project Conventions

- Use TypeScript strict mode with explicit return types
- Prefer `Result<T, Error>` pattern over throwing exceptions
- All API responses follow our envelope format: `{ data, error, meta }`
- Tests use vitest with the `describe/it` pattern
- Never use `any` β€” prefer `unknown` with type guards

AGENTS.md β€” agent instructions that can live anywhere in your repo. Unlike copilot-instructions.md (which must be in .github/), you can place multiple AGENTS.md files at different directory levels β€” the nearest one in the directory tree takes precedence. This makes it ideal for monorepos where each package needs its own agent behavior:

my-monorepo/
β”œβ”€β”€ AGENTS.md ← shared team-wide instructions
β”œβ”€β”€ packages/
β”‚ β”œβ”€β”€ frontend/
β”‚ β”‚ └── AGENTS.md ← React-specific agent rules (wins here)
β”‚ └── backend/
β”‚ └── AGENTS.md ← API-specific agent rules (wins here)

Every suggestion Copilot makes now respects these rules. No more "helpful" suggestions that violate your architecture.

MCP Servers: Giving Copilot New Abilities​

Model Context Protocol (MCP) servers let you plug external data sources and tools into Copilot's context. Think of them as APIs that Copilot can call mid-conversation β€” in both the IDE and CLI.

// .copilot/mcp.json
{
"mcpServers": {
"azure": {
"command": "npx",
"args": ["-y", "@azure/mcp@latest", "server", "start"]
}
}
}

Now Copilot can query your Azure resources, check deployment status, or read your database schema β€” all within the conversation.

Some MCP servers I use daily:

Skills: Repeatable, Deterministic Work​

Skills are the underrated powerhouse of Level 2. A skill is a directory with a SKILL.md file that defines a repeatable pattern β€” including deterministic steps from scripts and code.

.<directory>/skills/
β”œβ”€β”€ pr-review/
β”‚ └── SKILL.md # "Run lint, check test coverage, review diff"
β”œβ”€β”€ doc-sync/
β”‚ └── SKILL.md # "Compare API surface to docs, flag drift"
└── sdk-sample-check/
└── SKILL.md # "Validate all samples compile and match SDK version"

Read the Visual Studio documentation for the best directory location for your skill usage.

Skills differ from instructions in that they define executable workflows β€” not just preferences. A skill can include shell commands to run, files to check, and decision trees to follow. They're reusable across sessions and agents.

Why skills matter:

  • Repeatable β€” same process every time, no drift
  • Composable β€” skills can reference other skills
  • Deterministic where needed β€” embed scripts and validation steps that always run the same way
  • Shareable β€” check them into your repo, the whole team benefits

Try This Now​

  1. Create .github/copilot-instructions.md with your project's conventions
  2. Add an MCP server for a tool you use daily (Azure, database, etc.)
  3. Create a .github/skills/quick-review/SKILL.md that describes your code review checklist

Then open Copilot Chat or run copilot and notice the difference β€” it follows YOUR patterns now.

What I Learned at Level 2​

Custom instructions are absurdly high-leverage. A 50-line markdown file eliminates 80% of the "no, not like that" moments. MCP servers bridge "Copilot that knows code" and "Copilot that knows your infrastructure." Skills turn tribal knowledge into executable processes.

The limitation: everything is still per-session. Copilot doesn't automatically carry context between sessions β€” it won't remember decisions from yesterday's refactor. It doesn't have persistent context about your project's evolving state. It doesn't coordinate with other instances of itself.

Enter Squad.


Level 3: Squad β€” A Team Working in Concert​

πŸ–₯️ VS Code Β· ⌨️ CLI Β· πŸ‘€ Interactive Β· πŸ’» Local

Watercolor illustration of craftspeople collaborating at a shared workbench in a woodworking shop

The workshop is getting busy. You're at the bench, studying the blueprint. Around you, a small team of helpers is assembling a cabinet together β€” one holds the frame, another drives the dowels, another checks the level. Each knows their role. Each stays in their lane. The work moves faster because they each know their job and coordinate with each other, not just with you.

This is where the mental model shifts from "AI assistant" to "AI team."

Squad gives you a team of specialized agents working in concert to complete tasks, where each member's expertise and boundaries positively impact the result. It's not just "named agents with memory" β€” it's a coordinated system where the reviewer's standards shape the coder's output, and the docs writer's perspective catches gaps the implementer missed.

Squad runs on the Copilot CLI (copilot --agent squad) and adds the organizational layer that makes agents feel like a real team rather than a single assistant wearing different hats.

What Makes Squad Different​

FeatureRegular CopilotSquad
MemorySession-basedPersistent across sessions
IdentityGeneric assistantNamed agents with charters
CoordinationYou manage contextAgents hand off to each other
SpecializationSame agent for everythingDomain-specific agents with boundaries
Result qualityOne perspectiveDiverse perspectives improve output

Installing Squad​

# Install Squad CLI
npm install -g @bradygaster/squad-cli

# Initialize in your project
npx @bradygaster/squad-cli init

# Start Copilot with Squad (standalone CLI)
copilot --agent squad

This scaffolds a .squad/ directory:

.squad/
β”œβ”€β”€ agents/
β”‚ β”œβ”€β”€ ralph/ # Orchestrator
β”‚ β”‚ └── charter.md
β”‚ β”œβ”€β”€ reviewer/
β”‚ β”‚ └── charter.md
β”‚ └── docs-writer/
β”‚ └── charter.md
β”œβ”€β”€ ceremonies/
β”‚ └── sweep.md
└── memory/
└── decisions.md

Agent Charters: Expertise + Boundaries​

Each agent has a charter β€” a markdown file that defines who they are and what they do and, critically, what they won't do:

# Reviewer Agent Charter

## Identity
You are the code reviewer for this project. You focus on:
- Security vulnerabilities
- Performance anti-patterns
- Consistency with project conventions

## What I Own
- TypeScript files and build system

## Boundaries
- Never approve your own changes
- Escalate architectural concerns to the team lead
- Don't refactor code that isn't in the PR scope

The boundaries matter as much as the expertise. A reviewer that knows when to escalate produces better outcomes than one that tries to handle everything. The interplay between agents β€” where one's output becomes another's input β€” is what makes Squad feel like a team rather than parallel solo workers.

Ceremonies: On-Demand Structured Workflows​

Ceremonies are repeatable workflows you trigger when needed:

# Ceremonies & Rituals

## Design Review

**When:** Before PRD implementation begins
**Who:** <list of named agents>
**Purpose:** Validate requirements, issue templates, and process flow before work starts

## Retrospectives

**When:** After major deliveries (GitHub Projects setup, issue templates, Actions automation)
**Who:** All team members
**Facilitator:** <single agent name>
**Purpose:** Reflect on what worked, what didn't, continuous improvement

## Cross-Repo Sync

**When:** As needed
**Owner:** <single agent name>
**Purpose:** Ensure coordination across all projects (reads repos.json for scope)

Ceremonies encode your team's best practices into executable workflows that any agent can run consistently.

Try This Now​

With the Squad open in a Copilot CLI interactive chat, assign work to the squad.

# Then talk to the team:
"Team, fan out and review this PR for security issues"
"Ralph go"

What I Learned at Level 3​

The agents and charter system is what makes Squad click. With it, you have agents that maintain consistent behavior, remember decisions, and build expertise over time. Without it, you have "Copilot with extra steps."

The real insight: diversity, expertise, coordination, and boundaries create quality.When the reviewer can't approve its own work, when the docs writer must verify against actual code, when the security agent escalates instead of guessing β€” the team produces better results than any single agent could alone.

The honest trade-off: Squad requires investment in codifying your work patterns and practices. A poorly-defined agent is worse than no agent because it gives inconsistent results. Spend the time upfront.


Level 4: Autonomous Operations​

πŸ–₯️ VS Code Β· ⌨️ CLI Β· πŸ€– Autonomous Β· πŸ’» Local Β· ☁️ Cloud

Watercolor illustration of workers building furniture at separate workbenches in a woodworking shop

The helpers are working independently across the shop β€” each at their own bench, each building a different piece from your specifications. One saws, one hammers, one planes. You glance across the room and trust the work because you wrote clear blueprints for your team of experts. They don't need you hovering.

Level 4 is where the work has been fully defined and you just need it completed. You've already figured out what needs to happen β€” now you hand it off and let the system execute.

This is the difference between "AI that helps me work" and "AI that does the work I've specified."

Five Ways to Run Autonomously​

1. VS Code Agent Mode​

πŸ–₯️ VS Code Β· πŸ€– Autonomous Β· πŸ’» Local

In VS Code, Copilot's agent mode executes multi-step tasks β€” reading files, running commands, editing code β€” without manual intervention. You describe the outcome, and agent mode figures out the steps:

# In VS Code Copilot Chat (agent mode):
"Refactor all API handlers to use the new error envelope format"

Agent mode uses your custom instructions and MCPs from Level 2, so it already knows your project's conventions. Best for: well-scoped tasks while you're in the IDE.

2. Copilot CLI Agent Mode​

⌨️ CLI Β· πŸ€– Autonomous Β· πŸ’» Local

The standalone CLI provides the same autonomous execution outside VS Code:

# CLI agent mode β€” executes the full task autonomously
copilot -p "Refactor all API handlers to use the new error envelope format"

Best for: well-scoped tasks from the terminal, scripted workflows, or when you prefer the command line over the IDE.

3. "Ralph, go" β€” Squad Work Queue (In-Session)​

⌨️ CLI Β· πŸ€– Autonomous Β· πŸ’» Local

Ralph, the Squad work monitor, processes your entire work queue autonomously within a Copilot session. First, connect Squad to your repo's issues ("pull issues from owner/repo"). Then Ralph triages those issues, assigns work to the right specialist agents, monitors progress, and keeps going until the board is clear:

# In a Copilot CLI session with Squad:
copilot --agent squad

# Then:
"Ralph, go" # β†’ Starts processing the work queue
"Ralph, status" # β†’ Shows what's open, stalled, or ready to merge

Ralph monitors GitHub issues, triages incoming work, and drives tasks through your agent team without you intervening. It doesn't stop between tasks β€” it keeps cycling until everything is done.

Best for: in-session work queue processing, multi-agent coordination, and batching related tasks.

4. Squad Watch β€” Persistent Local Monitoring​

⌨️ CLI Β· πŸ€– Autonomous Β· πŸ’» Local

When you're away from the keyboard but your machine is on, squad watch provides persistent polling of your GitHub issues:

# Polls every 10 minutes (default)
npx @bradygaster/squad-cli watch

# Custom intervals
npx @bradygaster/squad-cli watch --interval 5 # every 5 minutes
npx @bradygaster/squad-cli watch --interval 30 # every 30 minutes

This runs as a standalone local process (not inside Copilot) that auto-triages issues from your connected repo, assigns work based on team roles and keywords, and routes issues to agents or @copilot for pickup. It runs until you Ctrl+C. (Requires the same repo connection set up via Squad.)

Best for: overnight monitoring, catching issues while you're in meetings, and persistent triage between active sessions.

5. Copilot Cloud Agent (GitHub Issues)​

☁️ Cloud Β· πŸ€– Autonomous Β· 🌐 GitHub.com

Assign a GitHub issue to Copilot and it works independently β€” no terminal open, no local setup. The cloud agent runs in a GitHub Actions-powered ephemeral environment: it researches your repo, creates a plan, makes code changes, and opens a PR.

Trigger it from a GitHub issue comment:

<!-- In a GitHub issue comment: -->
@copilot implement this

Or assign the issue to Copilot directly from the GitHub Issues UI, VS Code, JetBrains, or the GitHub CLI.

The cloud agent works best for well-scoped, clearly described issues: "add a new endpoint that follows the existing pattern," "write tests for this module," "update the config schema to support the new field." Think of this as a single async task you hand off β€” describe the outcome clearly, and come back to a PR.

It uses GitHub Actions minutes and Copilot premium requests, so you're trading compute for time. No local session required; the work happens entirely on GitHub's infrastructure.

When to Use Each​

ApproachBest ForRuns OnRequires Active Session?
VS Code agent modeIDE-scoped tasksYour machineYes
copilot CLITerminal-scoped tasksYour machineYes
"Ralph, go"Work queue + coordinationYour machine (Squad)Yes
squad watchPersistent monitoringYour machine (background)No β€” standalone process
Copilot cloud agentIssue-driven implementationGitHub's cloudNo β€” fully async

The Autonomy Spectrum​

These options form a spectrum from "I'm here watching" to "I'm asleep":

You're present              You're away              You're asleep
─────────────────────────────────────────────────────────────────
VS Code agent mode β†’ squad watch β†’ Copilot cloud agent
Copilot CLI β†’ (machine on) β†’ (GitHub cloud)
Ralph, go

What I Learned at Level 4​

The key insight: autonomous execution requires fully-defined work. The quality of autonomous output is directly proportional to how clearly the task was specified. Vague issues get vague results. A well-written issue with acceptance criteria, examples, and constraints? That's where autonomous execution shines.

The cloud agent on GitHub is the lowest-friction option β€” no local setup, just assign an issue. squad watch bridges the gap between active sessions and cloud β€” your machine monitors and triages even when you're not in a Copilot session. Ralph is best when you're actively working through a backlog and want coordinated multi-agent execution.


Finding Your Path​

Not everyone takes the same route through these levels:

RoleStart HereQuick WinLevel Up
EngineerLevel 1 (completions + CLI)Custom instructions for your stackSkills for repeatable reviews
PM/ContentLevel 1 (chat for drafting)Custom instructions for voice/styleSquad ceremonies for sweeps
Team LeadLevel 2 (instructions + MCPs)Skills for team processesSquad for coordinated reviews
PlatformLevel 2 (MCP + infra context)Squad for monitoringSquad for always-on monitoring

The Ecosystem at a Glance​

The Copilot ecosystem is growing fast. Here are the key resources:

Essential Tools​

  • GitHub Copilot Extension β€” the IDE extension (VS Code, JetBrains, etc.)
  • Copilot CLI β€” standalone copilot command for terminal
  • Squad CLI β€” named agents working in concert (npm i -g @bradygaster/squad-cli)

Learning & Community​

Infrastructure​


What Actually Changed for Me​

I want to be honest about what's different after six months at Level 3+:

What improved:

  • PR turnaround dropped from days to hours (the green shirts handle first-pass review)
  • Documentation stays in sync with code (sweep ceremonies catch drift)
  • I work in unfamiliar codebases with dramatically less ramp-up time
  • Boilerplate tasks that used to take 30 minutes take 2 minutes
  • Skills encode my best practices β€” I define a process once, it runs the same way forever

What didn't change:

  • Architecture decisions still require human judgment
  • Debugging subtle logic errors still requires deep thought
  • Agent output needs review β€” trust but verify
  • Writing good charters and instructions is a skill that takes time to develop, update, and improve

The mental model shift: I stopped thinking "what code do I need to write?" and started thinking "what work needs to happen, and who should do it?" Sometimes the answer is me β€” blue shirt at the bench, swinging the mallet. Often it's a green shirt with clear instructions and a well-scoped task.


Start Today​

You don't need to plan all four levels. Start where you are:

Never used Copilot? β†’ Install the extension, write a comment, press Tab. That's it.

Using Copilot but it's generic? β†’ Write a copilot-instructions.md file and one skill. 10 minutes, massive payoff.

Want more than autocomplete? β†’ Install Squad CLI, write one agent charter, run copilot --agent squad.

Ready for autonomous execution? β†’ Try copilot --autopilot on a well-defined task, or assign an issue to the cloud agent.

The progression is natural. Each level solves a real problem you'll discover at the previous one. And unlike most "AI transformation" pitches, you can validate the value at every step before investing in the next.

The future of development isn't AI replacing developers. It's developers who know how to orchestrate AI systems outperforming those who don't. The tools are here. The ecosystem is open source. The only question is which level you start at.

Want to go further? The next post in this series covers Cloud-Scale Agent Fleets for Level 5 β€” coming soon.


πŸ“£ GitHub Copilot Dev Days β€” Next Week!​

Want to go deeper? GitHub Copilot Dev Days are happening next week with sessions in multiple languages and time zones:

These are free, virtual events covering the latest in Copilot extensibility, agentic development, and the ecosystem tools discussed in this post. See you there!


Have questions or want to share your own journey? Find me on GitHub at @dfberry or check out my other posts on the Copilot ecosystem.

Exploring Copilot CLI Session Management to Improve Squad

Β· 13 min read

I've been using Squad, an AI team framework built on top of Copilot CLI, and I kept wondering: Copilot CLI already tracks everything that happens in a session β€” could that data make Squad's agents smarter? I spent some time digging into how both systems manage session data, and I think there's an untapped opportunity.

This post is my investigation notes β€” what I found, how the two systems compare, and where I think they could be combined for more value.

My working theory: Copilot is your diary (what happened). Squad is your playbook (what to do about it). Right now they're like two lighthouses on opposite shores of Bellingham Bay β€” both useful, but no bridge between them.

Two lighthouses on opposite shores of Bellingham Bay, their beams not quite connecting

What I Found: Two Memory Systems​

Copilot CLI: The Raw Record​

Copilot CLI records every session β€” prompts, responses, tool calls, file changes, and checkpoints. I discovered it powers:

  • /resume β€” pick up where you left off in any previous session
  • /chronicle β€” generate standup reports, get personalized tips, improve your custom instructions
  • /session β€” view and manage your sessions directly from the CLI

Session data lives in ~/.copilot/session-state/ as files and in ~/.copilot/session-store.db as a structured SQLite database.

What Copilot remembers: Everything that happened in every session β€” the full transcript.

What it doesn't do: Extract meaning. Copilot stores the raw conversation, not the conclusions you drew from it.

Squad: The Distilled Knowledge​

Squad's memory is different β€” and this is where I see the gap. It's not a transcript β€” it's distilled knowledge, stored as markdown files in your repo:

WhatFilePurpose
Team decisions.squad/decisions.mdShared brain β€” every agent reads this
Agent memory.squad/agents/{name}/history.mdPersonal learnings per agent
Skills.copilot/skills/{name}/SKILL.mdRepeatable tasks with everything needed to execute
Session state.squad/sessions/*.jsonResume data (gitignored by default)
Scribe logs.squad/log/*.mdSession summaries (gitignored by default)

What Squad remembers: Decisions, patterns, preferences, and skills β€” the things that should change how agents behave next time.

What it doesn't do: Record the full conversation. That's Copilot's job.

The Gap I See​

The two systems complement each other, but right now they're completely disconnected β€” like looking across Deception Pass and seeing the other side but having no way to cross.

Water rushing through a rocky gorge at Deception Pass β€” two cliff faces close together with no bridge between them

Here's where each system shines:

QuestionWhere to look
"What did I do last Tuesday?"Copilot β€” /session or /chronicle standup
"What did the team decide about auth?"Squad β€” .squad/decisions.md
"Have I worked on this file before?"Copilot β€” /session to browse past sessions
"How do we run a content audit?"Squad β€” .copilot/skills/content-audit/SKILL.md
"What went wrong last time I tried this?"Copilot β€” session transcript via /resume
"What does this agent know about TypeSpec?"Squad β€” .squad/agents/{name}/history.md

This separation works, but it's manual. You have to be the bridge β€” ferrying insights across the water yourself. That's the opportunity I'm investigating.

Where I Think Session Data Could Improve Squad​

Squad has a built-in skill called reskill ("team, reskill") that audits agent charters and histories, extracts shared patterns into skills, and compresses bloated files. Think of it as sorting the morning catch on a Bellingham dock β€” keeping what's valuable, tossing the rest back.

Fisherman on a Bellingham dock sorting the morning catch into labeled crates

But reskill today is purely file-based β€” it reads .squad/ markdown and looks for textual duplication. It has no idea what actually happened in sessions.

Here's what I think session data could add:

Signal from Copilot sessionsWhat Squad could do with it
Agent X was spawned 40 times but only useful 25 timesRefine charter to reduce misfires
Agent Y always gets the same 3 files as inputBake those into charter's "What I Own"
Users keep correcting the same mistakeExtract as anti-pattern in a skill
An agent never gets spawnedFlag for removal during reskill
Two agents always get spawned togetherSuggest merging or formalizing the pairing
Certain skills are read but never appliedDeprecate during reskill
Session durations spike after charter changesDetect regressions from past reskills

There are two existing proposals in the Squad repo that go in this direction β€” tiered memory (#600, open) for hot/cold/wiki context layers, and reflect (#621, closed PR β€” not merged) for in-session learning capture. Neither one references Copilot CLI session data though. They're both Squad-internal. The bridge between Copilot's behavioral data and Squad's knowledge system doesn't exist yet.

Ideas I'm Exploring​

The theme here is a feedback loop β€” raw session data flows downstream, gets refined into knowledge, and that knowledge shapes the next session. Like the Nooksack River circling back toward the mountains that feed it.

The Nooksack River looping back toward Mount Baker, papers transforming into books at the bend

1. Feed /chronicle into Reskill​

After a productive session, Squad agents already extract the important parts:

  • Decisions go to .squad/decisions.md
  • Learnings go to agents/{name}/history.md
  • Reusable patterns become skills

But what if reskill could also query Copilot's session store to find patterns agents missed? /chronicle improve already analyzes session history to suggest custom instruction improvements. That same analysis could feed into Squad's skill extraction pipeline β€” Copilot finds the behavioral pattern, Squad encodes it permanently.

2. Use /chronicle for Behavioral Analysis​

Copilot's /chronicle improve analyzes session history to find where agents struggled or needed correction. I'm thinking about how to make this a systematic input to Squad:

  • Run /chronicle improve periodically
  • Take the suggestions and apply them to agent charters or team directives
  • This creates a feedback loop: Copilot finds the pattern, Squad encodes it permanently

Today this is manual. I'd love to see a squad reskill --from-chronicle that automates the loop.

3. Use /session for Context​

When starting work on something you've touched before, use /session to browse previous sessions and find relevant context:

"Before starting, check /session for any previous sessions 
that touched these files. Summarize what was done and any issues."

This gives agents a head start without you having to remember and re-explain.

4. Use Squad for Cross-Agent Memory​

Copilot's session history is per-user. Squad's memory is per-team. When Agent A discovers something that Agent B needs to know, Squad's shared files make that happen:

  • Scribe writes cross-agent updates to affected agents' history.md
  • Decisions in decisions.md are read by every agent at spawn time
  • Skills are shared β€” any agent can use any skill

The Gitignore Decision​

Squad gitignores session-related files by default. Here's what that means and when to change it:

FileDefaultChange when
.squad/sessions/GitignoredCommit if you need session transcripts in git (training repos, research)
.squad/log/GitignoredCommit if you want Scribe's summaries as an audit trail
.squad/orchestration-log/GitignoredCommit if you want agent routing history preserved
.squad/decisions.mdCommittedNever gitignore β€” this is the team's shared brain
.squad/agents/*/history.mdCommittedNever gitignore β€” this is each agent's knowledge
.copilot/skills/CommittedNever gitignore β€” these are your reusable patterns

The recommended hybrid: Keep sessions gitignored, but commit Scribe's logs for a lightweight audit trail. Remove .squad/log/ and .squad/orchestration-log/ from .gitignore to enable this.

⚠️ One caveat: If your org requires audit trails of AI interactions, git probably isn't the right system of record β€” no retention policies, no redaction, no legal hold. Worth checking before treating committed sessions as a compliance solution.

Under the Hood (Skip Unless Debugging)​

Copilot CLI stores session data in two places: file-based events in ~/.copilot/session-state/{session-id}/events.jsonl and a searchable SQLite database at ~/.copilot/session-store.db. The database powers /chronicle and /session β€” you need "experimental": true in ~/.copilot/config.json to enable these features. Without experimental mode, /chronicle won't be available β€” enable it with /experimental on in any session.

Each session folder contains the event stream (every tool call, message, and model metric), workspace metadata, and checkpoint snapshots that /resume uses to reconstruct context. The session.shutdown event in events.jsonl is worth finding β€” it shows your token usage, cache hit rates, and code changes in one place.

The SQLite database (~59 MB after ~770 sessions in my case) holds structured records across seven tables: sessions, turns, checkpoints, session_files, session_refs, and an FTS5 search index. Records persist even after session directories are cleaned up. Don't delete the .db-wal file while Copilot is running β€” you'll lose recent writes.

What's in the .squad Session Files​

If you're using Squad to orchestrate AI agents, there's a parallel session storage layer inside .squad/ in your repo. While .copilot/ tracks platform sessions, .squad/ accumulates session-by-session team memory.

Session-Scoped Files (Created Per Session)​

These files can be traced back to a specific session:

FileWhat It Contains
orchestration-log/{timestamp}-{agent}.mdWho was spawned, why, what they did. Append-only audit trail.
log/{timestamp}-{topic}.mdScribe's session summary.
decisions/inbox/{agent}-{slug}.mdEphemeral drop-box β€” agents write decisions here during a session. Scribe merges them into decisions.md afterward.
identity/now.mdUpdated each session with current focus. Every agent reads this at spawn so they hit the ground running.

Running-State Files (Modified Across Sessions)​

These files accumulate changes but don't track which session changed them:

FileHow It Changes
agents/*/history.mdGrows each session as agents record learnings. Scribe summarizes when it exceeds ~15 KB.
agents/*/charter.mdUpdated if an agent's role evolves. No session linkage.
skills/{name}/SKILL.mdCreated or updated when agents discover reusable patterns.
decisions.mdThe canonical decision ledger β€” grows each session, entries are dated.
team.md, routing.mdUpdated when members join or leave.
casting/registry.jsonNew agent names registered here. Persistent.

The distinction matters: session files are created per session and disposable. Running-state files are your team's accumulated intelligence β€” they compound over time.

The Two-Layer Model​

Together, .copilot/ and .squad/ form a complete session memory system β€” like Whatcom County's geology, where buildings sit on the visible surface but the real water supply flows through the aquifer below.

Cross-section of Whatcom County geology β€” buildings on the surface, aquifer below, a well connecting them

LayerLocationScopeWhat it tracks per session
Platform~/.copilot/Per-user, cross-projectEvents, turns, tool calls, model metrics
Team.squad/ (in repo)Per-project, cross-sessionOrchestration logs, agent memory, decisions, focus

The platform layer is invisible infrastructure β€” you don't commit it, you query it. The team layer is committed to the repo β€” it travels with the code and survives across machines, sessions, and team members. Surface and aquifer, both feeding the same ecosystem.

Try This​

Ready to explore your own session data? Here are three things you can do right now:

  1. Browse your sessions: Open ~/.copilot/session-state/ and look at the events.jsonl from your most recent session. Search for session.shutdown to see your token usage and cache hit rates.

  2. Query your history: In any Copilot CLI session, try /session to browse your past sessions. Use /resume to jump back into a previous session with full context.

  3. Feed Copilot into Squad: Run /chronicle improve and review the suggestions. Pick one that matches a recurring pattern and say: "Make that a skill" or "Add that to decisions."

If you're not using Squad yet, #1 and #2 still work β€” they're pure Copilot CLI. The session data is there whether you browse it or not.

If You're Building an Agent on Top of Copilot​

This investigation was Squad-specific, but the underlying insight applies to anyone building on Copilot CLI: there's a lake of session data sitting right there in ~/.copilot/ β€” and most agents ignore it completely.

The good news is the plumbing already exists. The Copilot SDK (@github/copilot-sdk) exposes session listing, full event history, and real-time event subscriptions. You can filter sessions by repo or branch, pull every tool call and assistant response, and subscribe to events as they happen. The data access is there β€” what's missing is the intelligence layer on top.

Here are three ideas I keep coming back to β€” none of them Squad-specific:

1. Adaptive Prompt Tuning Based on Tool Failure Rates​

I noticed in my own session data that certain tool calls fail repeatedly β€” grep with regex that doesn't match the codebase's naming conventions, for example. An agent could watch for these patterns and silently adjust its strategy β€” switching to glob patterns, broadening search terms, adding fallback chains β€” without me ever asking. Like a fishing guide who notices you keep casting into the wrong current and quietly repositions the boat.

2. Cross-Session Onboarding for New Repos​

When I open a new repository for the first time, the agent has zero context about how I work. But my session history from other repos is right there β€” it shows whether I prefer TypeScript or JavaScript, whether I write tests first, which frameworks I reach for. An agent could mine that cross-project session data to bootstrap a developer profile, skipping the cold-start problem. First day in a new codebase, but the agent already knows your habits.

3. Drift Detection Between Intent and Outcome​

Session data captures both what I asked for and what the agent actually did β€” tool calls, file edits, test results. Over time, an agent could spot drift: I keep correcting the same kind of CSS suggestion, or certain requests consistently take multiple follow-up turns. Imagine the agent saying, "You frequently adjust my styling β€” want me to follow a specific style guide?" That turns passive logs into active self-improvement.

The common thread: session data isn't just a transcript β€” it's telemetry. Any agent that treats it as a feedback signal rather than a static log has a real advantage, like reading the tides instead of just watching the water.

The Bottom Line​

Use both memory systems intentionally:

  • Copilot handles the raw history. Let it. Don't try to replicate session transcripts in Squad files.
  • Squad handles the distilled knowledge. Invest here β€” decisions, history, and skills are what compound.
  • Feed insights from Copilot back into Squad via /chronicle improve, directives, and skill creation.
  • Start with the default gitignore. The valuable stuff is already being committed. Relax later if you need session trails.

Your agents get smarter not because they remember every conversation, but because the important conclusions persist in the right place. The river keeps flowing β€” what matters is what settles into the riverbed.