‹ Aigile Playbook Architecture
Engineering Playbook · Architecture Reference

Runtime Architecture: Claude Code + GitHub Copilot

Continuous workflow · Event-Driven Triggering · Decoupled Compute · Unit of Output
Event-Driven Triggering
Decoupled Compute
Unit of Output
Claude Code
GitHub Copilot
Layer 1 — Event-Driven Triggering
flowchart LR subgraph HUMAN ["👤 Human-Initiated (Synchronous)"] H1["Developer types
/plan_to_build
or /build
in terminal"] H2["Developer opens
Copilot Chat
types prompt
or /prompt-name"] end subgraph REPO ["📁 Repo-Event-Initiated (Asynchronous)"] R1["Issue opened
or labelled
on GitHub"] R2["PR opened
or comment
added @copilot"] R3["Push to branch
or CI trigger"] end subgraph SCHED ["⏰ Scheduled / Pipeline"] S1["CI/CD pipeline
nightly run
or cron job"] S2["claude -p headless
in GitHub Actions
or script"] end H1 -->|"starts
Claude Code
session"| CC(("Claude
Code")) H2 -->|"starts
Copilot
agent mode"| CP(("GitHub
Copilot")) R1 -->|"assigns task
to Copilot
coding agent"| CP R2 -->|"triggers
Copilot
coding agent"| CP R3 -->|"can trigger
either"| CC R3 --> CP S1 -->|"headless
claude"| CC S2 --> CC style HUMAN fill:#eef7f1,stroke:#2d7a4f,color:#1a1a1a style REPO fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style SCHED fill:#fdf6e3,stroke:#b08a2e,color:#1a1a1a style CC fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style CP fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a
Claude Code triggers Human-initiated via terminal or headless via claude -p in CI/CD. No native repo-event triggering — developer or pipeline must initiate. Sessions are synchronous by default; background tasks via run_in_background.
Copilot triggers Human-initiated via Copilot Chat, OR repo-event-initiated via GitHub Issues/PRs/comments. The async coding agent fires from repo events with zero human presence required. This is the key trigger difference.
Key insight Claude Code requires a human or pipeline to start it. Copilot's coding agent can self-start from repo events. For a team using both: use Copilot for autonomous repo-event work, Claude Code for interactive and pipeline-driven work.
↓ triggers flow into compute ↓
Layer 2 — Decoupled Compute
flowchart TB subgraph LOCAL ["🖥️ Local Compute (Claude Code)"] direction TB LS["Single Session
200k context
synchronous
user present"] subgraph SA ["Subagent Mode (Task Tool)"] direction LR P["Lead Session"] -->|"Task()"| S1["Subagent A
own context
read-only report back"] P -->|"Task()"| S2["Subagent B
own context
read-only report back"] end subgraph AT ["Agent Teams Mode (experimental)"] direction LR TL["Team Lead
own context"] -->|"TeamCreate
TaskCreate"| T1["Teammate 1
own context
own session"] TL -->|"TeamCreate
TaskCreate"| T2["Teammate 2
own context
own session"] TL -->|"TeamCreate
TaskCreate"| T3["Teammate 3
own context
own session"] T1 <-->|"SendMessage
peer-to-peer"| T2 T2 <-->|"SendMessage
peer-to-peer"| T3 T1 <-->|"SendMessage"| T3 end LS --- SA SA --- AT end subgraph CLOUD ["☁️ Cloud Compute (Copilot Coding Agent)"] direction TB GHA["GitHub Actions
runner
isolated env
no user present"] GHA -->|"sequential
subagents"| CA["Copilot Agent
reads repo
writes code
runs tests"] CA -->|"no peer
messaging"| CA end subgraph VSCODE ["💻 VS Code (Copilot Agent Mode)"] direction TB AGM["Agent Mode
single session
sequential subagents
user present"] end style LOCAL fill:#fdf0ec,stroke:#c84b2f,color:#1a1a1a style CLOUD fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style VSCODE fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style LS fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style P fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style S1 fill:#f7ece8,stroke:#c84b2f,color:#7a7468 style S2 fill:#f7ece8,stroke:#c84b2f,color:#7a7468 style TL fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style T1 fill:#fdf6e3,stroke:#b08a2e,color:#1a1a1a style T2 fill:#fdf6e3,stroke:#b08a2e,color:#1a1a1a style T3 fill:#fdf6e3,stroke:#b08a2e,color:#1a1a1a style GHA fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style CA fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style AGM fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a
Claude Code compute model Three modes: single session (most work), subagents via Task tool (parallel isolated workers, report back only), Agent Teams (full peer sessions with shared task board + SendMessage). Each teammate is a full independent Claude Code instance with its own context window — not a thread, a full session.
Copilot compute model Two distinct environments: VS Code agent mode (local, interactive, sequential subagents) and Coding Agent (GitHub Actions, cloud, async, no peer messaging). The cloud runner is fully isolated — no user present, no terminal. It can only communicate via PR/commit artifacts.
The critical runtime difference Claude Agent Teams sessions are independent but coordinated — they share a task board on disk and can message each other mid-task. Copilot's coding agent is isolated with no equivalent coordination channel. This is what the diagram in the previous review was not capturing clearly.
↓ compute produces outputs ↓
Layer 3 — Unit of Output
flowchart LR subgraph OUT_CC ["Claude Code Outputs"] O1["Files changed
in working directory
(immediate, local)"] O2["Spec document
in specs/
(plan artifact)"] O3["Agent team
synthesis report
(in terminal)"] O4["OTel events
+ metrics
→ Observability Plane"] end subgraph OUT_CP ["Copilot Outputs"] O5["Pull Request
(formal code review artifact)
async, cloud"] O6["Inline suggestion
accepted/rejected
(VS Code)"] O7["Session logs
(GitHub Actions)
structured but no traces"] end subgraph REVIEW ["Human Review Gate"] R["Code Review
CI checks
Merge decision"] end O1 -->|"developer
reviews locally"| R O2 -->|"feeds next
agent run"| O1 O3 -->|"developer
reads summary"| R O5 -->|"PR review
CI passes"| R O6 -->|"accepted
into file"| O1 O4 -.->|"observability
feed"| RP["Observability Plane
dashboard"] style OUT_CC fill:#fdf0ec,stroke:#c84b2f,color:#1a1a1a style OUT_CP fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style REVIEW fill:#eef7f1,stroke:#2d7a4f,color:#1a1a1a style O1 fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style O2 fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style O3 fill:#f7ece8,stroke:#c84b2f,color:#1a1a1a style O4 fill:#eef7f1,stroke:#2d7a4f,color:#1a1a1a style O5 fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style O6 fill:#edf2fb,stroke:#2a5fa5,color:#1a1a1a style O7 fill:#edf2fb,stroke:#2a5fa5,color:#7a7468 style R fill:#eef7f1,stroke:#2d7a4f,color:#1a1a1a style RP fill:#fdf6e3,stroke:#b08a2e,color:#1a1a1a
Claude Code output Primary output is local file changes — immediate, in your working directory, requiring manual git commit and PR creation. The spec document is a first-class output that feeds the next agent run. OTel metrics and events flow continuously as a side channel.
Copilot output The async coding agent's primary output is a Pull Request — a formal artifact that enters the standard review workflow. This is architecturally significant: it integrates human oversight directly into the output, not as an afterthought.
Observability gap Claude Code emits metrics and events but no distributed traces. Copilot emits session logs but no OTel. Neither gives you a unified trace from trigger → reasoning → output. This is the gap ObservabilityAgent addresses — emitting OTel traces to the Rust sidecar that neither platform provides natively.
Continuous Workflow: How Both Platforms Compose
sequenceDiagram participant DEV as Developer participant CC as Claude Code
(local/terminal) participant SPEC as specs/ directory
(shared artifact) participant CP as Copilot Coding Agent
(cloud/async) participant GH as GitHub
(PR + CI) participant RP as Observability Plane
(OTel sidecar) DEV->>CC: /plan_to_build "add auth feature" Note over CC: Explores codebase
Designs solution
Agent Teams (optional) CC->>SPEC: writes specs/add-auth.md CC-->>RP: emits metrics + events DEV->>CC: execute specs/add-auth.md Note over CC: Sequential subagents
builder → validator
builder → validator CC->>GH: local files changed
(developer commits + opens PR) CC-->>RP: emits metrics + events Note over GH: PR opened triggers
Copilot Coding Agent GH->>CP: @copilot review this PR Note over CP: Runs in GitHub Actions
No user present
Reads PR diff + repo CP->>GH: opens review comments
or suggests fixes as new commits CP-->>RP: session logs only
(no OTel traces) GH->>DEV: CI passes, review ready DEV->>GH: approves + merges Note over RP: Unified view:
plan → build → review → merge
cost + outcome per workflow

What this runtime model reveals