subagents is a GitHub Copilot CLI plugin that adds a Codex-style slash-command surface for delegating work to model-selectable subagents.
The plugin keeps the UX close to the reference codex-plugin-cc repository, but it is implemented natively for GitHub Copilot CLI plugins:
/subagents:review/subagents:adversarial-review/subagents:rescue/subagents:status/subagents:result/subagents:cancel/subagents:setup
This repository is a GitHub Copilot CLI port of openai/codex-plugin-cc, the Apache 2.0 licensed Claude Code plugin published by OpenAI for using Codex from inside Claude Code.
The goal of this port is to preserve the same high-level review/rescue/status workflow while replacing the runtime and plugin packaging with GitHub Copilot CLI-native components. The original repository is for Claude Code plus Codex; this repository runs entirely inside GitHub Copilot CLI. Instead of relying on Claude Code's /plugin installation flow and a local codex binary, this repository uses copilot plugin install, plugin.json, commands/, custom Copilot agents, and a Node.js companion runtime.
- Uses the GitHub Copilot CLI plugin system (
plugin.json,commands/, and Copilot custom agents) instead of Claude Code's/plugincommand and.claude-plugin/layout. - Does not require an OpenAI account, OpenAI API credentials, or the
codexbinary. - Exposes
--modeland--effortdirectly on delegated commands instead of depending on upstream Codex-side configuration defaults. - Adds
--scope <auto|working-tree|branch>for review commands, plus--base <ref>when you want to force a review baseline. - Stores plugin state under
~/.copilot/plugins/subagents/. - Launches delegated work through nested
copilot -p ... --agent ...sessions, managed byscripts/copilot-companion.mjsandscripts/job-runner.mjs.
Each slash command is implemented as a Copilot CLI plugin command under commands/.
The commands do not perform the real work directly. Instead, they:
- locate the installed plugin root
- call
scripts/copilot-companion.mjs - let the companion launch a nested
copilot -p ... --agent ...session - store background job metadata and transcripts under
~/.copilot/plugins/subagents/
This makes it possible to:
- choose a model per delegated task with
--model - set reasoning effort with
--effort - run long work in the background and fetch it later
- resume the latest rescue session with
--resume
- GitHub Copilot CLI
1.0.13or newer - An active GitHub Copilot subscription. GitHub's documentation says Copilot CLI is available with all Copilot plans. If your Copilot access is managed by an organization or enterprise, the Copilot CLI policy must also be enabled there.
- Node.js
18.18.0or newer - Git
- No OpenAI account and no
codexbinary are required
copilot plugin install /absolute/path/to/copilot-cli-subagents-plugincopilot plugin install robustonian/copilot-cli-subagents-pluginAfter installing a local checkout, reinstall the plugin after every file change so Copilot picks up the updated plugin contents.
If you installed from GitHub and want to refresh to the latest published version, rerun the same copilot plugin install robustonian/copilot-cli-subagents-plugin command.
/subagents:setup
/subagents:setup --enable-review-gate
/subagents:setup --disable-review-gate
This checks whether node, git, and copilot are available, shows the plugin's state directory, and reports the current review-gate setting. The --enable-review-gate and --disable-review-gate flags update that setting and echo the action in the text output.
/subagents:review
/subagents:review --background
/subagents:review --model gpt-5.4 --effort xhigh --scope working-tree
/subagents:adversarial-review challenge the rollback and retry strategy
/subagents:adversarial-review --background --model gpt-5.4 --effort xhigh focus on race conditions
/subagents:rescue investigate why CI started failing
/subagents:rescue --model gpt-5.4 --effort xhigh fix the flaky integration test
/subagents:rescue --background refactor the retry logic safely
/subagents:rescue --resume apply the next fix from the previous run
/subagents:status
/subagents:status task-abc123
/subagents:status task-abc123 --wait
/subagents:result task-abc123
/subagents:cancel task-abc123
--wait--background--base <ref>--scope <auto|working-tree|branch>--model <model>--effort <low|medium|high|xhigh>
--wait--background--resume--fresh--model <model>--effort <low|medium|high|xhigh>
- The plugin intentionally keeps the command layer thin. Most behavior lives in
scripts/copilot-companion.mjs. - Background runs are executed by a detached
scripts/job-runner.mjsprocess. - The nested Copilot session is launched with a constrained tool set for reviews and a broader writable tool set for rescue tasks.
- On first use, Copilot CLI may still ask for permission before running the command-layer shell wrapper.
- Delegated work is executed through nested Copilot CLI sessions, so Copilot usage and accounting follow GitHub Copilot CLI behavior for those child sessions as well.
- See
NOTICEfor upstream attribution and modification notice information.
Run the test suite:
npm testReinstall the local plugin into Copilot CLI after changes:
copilot plugin install /absolute/path/to/copilot-cli-subagents-plugin