Repository navigation
Conversation
…e Claude hooks Copilot CLI (verified on 1.0.108) reads hooks from Claude's settings file and fires them with Claude's event names and payloads, so it rides the Claude hook dialect: status, recent prompts, session id capture, permission prompts and ask_user questions all report without a new installer. Three things are Copilot's own: - The first prompt rides -i (no positional prompt) and a restart runs copilot --resume <id>. - Injected context is read only from a top-level additionalContext, so the auto-title instruction goes out in that shape for Copilot rows. - PermissionRequest fires for every tool call, including auto-approved ones, so it is dropped and the permission_prompt notification, which fires only as a dialog opens, is the wait. The launch carries --allow-tool=shell(nebula:*) so the auto-title nebula rename runs unprompted; Copilot reads no permission rules from Claude's settings. PROTOCOL_VERSION 51 -> 52 for the new AgentKind; additive, so MIN_COMPATIBLE_PROTOCOL stays at 49. Closes AgentSystemLabs#211 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3h4btM4mhdF58HbnSsXnC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contents: ✨ What you get · 📸 Screenshots · 🧭 How it flows ·⚠️ Risk · 🔧 Technical overview · 📝 Notes
GitHub Copilot CLI joins the built-in harnesses: pick Copilot in the NEW SESSION PICKER and the session reports live status like a Claude one. Copilot CLI reads Claude's hook file and fires Claude-shaped payloads, so it rides the hooks nebula already installs; no new installer.
✨ What you get
🚀 Launch Copilot like any other harness
n, then Copilot; alsonebula spawn --kind copilotandquick_prompt_kindcopilot(npm i -g @github/copilot), verified on 1.0.108-iand survives Copilot's folder-trust dialogSettings › Agents › Copilot--modeland--reasoning-effortdefaultuntilharnesses.copilot.modelslists idscopilot --resume <id>🔔 Know when it needs you
<worktree>/.claude/settings.local.jsonharnesses.copilot.permissions_flag: "--allow-all"opts outask_usertool is reported asAskUserQuestion, so a question turns the row red tooPermissionRequestfor those as well; see the technical overview)nebula renameon the first prompt--allow-tool=shell(nebula:*)so the rename runs without a prompt📸 Screenshots
The NEW SESSION PICKER after the change, captured with the SCREENSHOT HARNESS (
make shot SCENE=copilot-picker KEYS="n"). Shown as terminal output because this PR comes from a fork, which cannot push to thepr-assetsbranch.A live run (real
copilot1.0.108 in a nebula pane, a prompt that runs a shell command, the permission dialog open):🧭 How it flows
sequenceDiagram participant C as copilot CLI participant H as HOOK RECEIVER (/api/hooks/claude) participant S as status machine Note over C: runs the hooks in .claude/settings.local.json C->>H: UserPromptSubmit {session_id, prompt} H-->>C: {"additionalContext": AUTO-TITLE instruction} H->>S: UserPromptSubmit → running C->>H: PermissionRequest (every tool call) Note over H: dropped for Copilot rows C->>H: Notification permission_prompt (dialog opened) H->>S: PermissionRequest → needs feedback C->>H: PostToolUse H->>S: running C->>H: Stop H->>S: finished🎯 Attack surface
copilot. Reached only by a user creating a Copilot session (ornebula spawn --kind copilotfrom a session they already run). Held by: the same registry, PATH probe and single-quoted login-shell argv as every other harness. Not held: what Copilot itself does once running, as for any harness.--allow-tool=shell(nebula:*)on every Copilot launch. It lets the agent run anynebulasubcommand without a prompt, the same set Claude'sBash(nebula …:*)rules allow plus the rest. Held by: the pattern matches thenebulacommand only. Not held: it is broader than Claude's seven named subcommands; Copilot's per-subcommand matching is documented only for a fixed list of tools, so the narrower form was not verified.harnesses.copilot.launch_argsoverrides it.Verdict: 🟢 Low risk — a new row in the harness table plus two kind-keyed branches in the hook receiver; nothing changes for a session that is not Copilot.
nebulacommandget_agentstore read per hook POST on the Claude route; off the TUI draw and PTY byte pathsRollback:
git revertremoves the harness. It does not undo the PROTOCOL VERSION bump on already-running daemons, and Copilot rows already in a store would then load as Claude rows (parse_agent_kindfalls back to the default kind).🔧 Technical overview
AgentKind::Copilotgets aHarnessDescriptorwithhooks: "claude", so spawn installs the Claude hooks and Copilot posts to/api/hooks/claude. The receiver looks up the row's kind and, for Copilot, (a) answersUserPromptSubmitwith a top-leveladditionalContext, because Copilot parses and drops Claude'shookSpecificOutputenvelope, and (b) dropsPermissionRequestand maps thepermission_promptnotification to it, because Copilot firesPermissionRequestfor auto-approved calls and its notification is immediate, not deferred like Claude's.crates/nebula-core/src/harness.rs— the descriptor row, with the verified flags in its comment;crates/nebula-core/src/entities.rs— the kind;crates/nebula-daemon/src/hooks/mod.rs—copilot_prompt_reply,copilot_eventand their tests;crates/nebula-daemon/src/registry.rs— the spawn-argv test;crates/nebula-tui/src/agent_picker.rs— the label; docs underdocs/.copilothook dialect installing into~/.copilot: it would avoid the per-worktree trust dialog gating hooks, but Copilot would still also run the Claude hooks left in a shared worktree and double-report. No model catalogue: the list is per account. No system-prompt guidance: Copilot has no flag for it.cargo fmt --check,cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test --workspacegreen. End to end against copilot 1.0.108 driven by a local mock model through its bring-your-own-provider mode: create from the TUI, permission wait, approve, daemon restart and resume. The issue's author has since run it with a signed-in account and a real model, where Copilot issued AUTO-TITLE'snebula rename. Not exercised: Copilot subagent (tasktool) hook traffic.📝 Notes
origin/mainat "Restore automatic names for new Codex sessions (Restore automatic names for new Codex sessions #213)"; no conflicts.AgentKind. Additive, soMIN_COMPATIBLE_PROTOCOLstays at 49.docs/configuration.md: Copilot's folder-trust dialog appears once per worktree and no hooks load until it is answered, so the row is grey until then.To test locally:
npm i -g @github/copilot, thencopilotand/login).make dev SEED=0), then add a test checkout. ThenebulaonPATHmust speak protocol 49 or later, or the session'snebula renameis refused with a protocol mismatch.n, pick Copilot, and give it a prompt that runs a command, such as "create a file called hello.txt". Answer Copilot's folder-trust dialog; the prompt runs once you do.agent-Nto become a short title.copilot --allow-tool=shell(nebula:*) --resume <id>.Prepared using the repository's PR description skill, benefit-groups template.
🤖 Generated with Claude Code