Skip to content

Let Copilot CLI host composite loops, and run a composite's workers on its backend - #257

Merged
scgopi merged 3 commits into
mainfrom
feat/copilot-composite
Sep 3, 2026
Merged

Let Copilot CLI host composite loops, and run a composite's workers on its backend#257
scgopi merged 3 commits into
mainfrom
feat/copilot-composite

Conversation

@scgopi

@scgopi scgopi commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Copilot CLI can now host composite loops, and a composite's workers run on the composite's backend.

Why Copilot couldn't host a composite

canHost(.composite) is capabilities.supportsSubAgents, and Copilot's row said false: it was read off Copilot CLI 0.0.410 / 1.0.75, whose help listed no sub-agent fan-out, and the capability table's rule is that anything unverified stays false rather than guessed.

There was a second, silent gap behind that one. A composite never runs a session of its own; its workers do. A worker created inside a composite with no backend named fell to NodeDraft.effectiveBackend, which is Claude Code. Flipping the row alone would have produced a composite labelled Copilot whose every worker ran Claude.

What changes

  1. Capability row flipped with evidence. Copilot CLI 1.0.80's copilot help commands lists /fleet ("enable fleet mode for parallel subagent execution"), /tasks ("view and manage tasks (subagents and shell commands)") and /subagents, and --agent <agent> is on the launch line. supportsSubAgents is now true, with the same older-Copilot caveat the time-based row carries.
  2. Workers inherit the composite's backend in the daemon. runInSubGraph fills an unnamed backend from the composite before the child store creates the node. A creator the tree can find still wins, and an explicitly named backend wins over both, the same precedence createNode already applies to loops fanning out from inside a session.
  3. The app form seeds the picker the same way. Adding a loop while a composite is open defaults the backend picker to that composite's backend, then the human's default.
  4. Tests. CopilotBackendTests pins the pairing being allowed; new CompositeBackendTests pins inheritance and the named-backend override (its own file because CompositeAndGlobalGraphTests sits at the lint type-body budget).

Verification

  • xcodebuild test in a worktree: full suite 1508 tests, only failures were the three tests that pinned composite+Copilot as refused (repointed at composite+Codex, which stays refused); the five affected suites then re-run green (74 tests, including the new CompositeBackendTests).
  • swiftlint 0 errors, swift format lint --strict clean on the changed files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pxwzz1AZnVE3peZ8qMejLa

scgopi and others added 3 commits September 2, 2026 19:42
Copilot's supportsSubAgents row was written against a CLI with no fan-out. 1.0.80
lists /fleet (parallel subagent execution), /tasks (subagents and shell commands)
and /subagents, plus --agent on the launch line — the capability a composite leans
on — so the row flips to true and the picker stops refusing the pairing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pxwzz1AZnVE3peZ8qMejLa
A composite never runs a session of its own; its workers do, and a worker created
inside one with no backend named fell to NodeDraft.effectiveBackend — Claude Code.
A composite labelled Copilot would have run Claude workers. Sub-graph creation now
fills an unnamed backend from the composite (a findable creator still wins, a named
backend wins over both), and the app's form seeds its picker with the open
composite's backend the same way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pxwzz1AZnVE3peZ8qMejLa
@scgopi
scgopi merged commit 081731c into main Sep 3, 2026
1 check passed
scgopi added a commit that referenced this pull request Sep 3, 2026
Re-land Copilot composite support dropped by e0a0043 (#257)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant