Enable rubber duck and /rubber-duck command#318662
Merged
Merged
Conversation
…duck command Add chat.agentHost.rubberDuck.enabled setting (default-on for insiders/dev, hidden from stable) that gates the RUBBER_DUCK_AGENT feature flag. The flag flows from the VS Code setting through the agent host starters into the CLI subprocess environment. Add /rubber-duck slash command that invokes the critic subagent for an independent review of the current approach. The command is only visible when the feature is enabled.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires up the “Rubber Duck” critic subagent in the Agent Host by introducing a dedicated VS Code setting that controls propagation of a RUBBER_DUCK_AGENT env var into the agent-host process, and adds a /rubber-duck slash command surfaced via Copilot CLI completions and handled in the Copilot agent session.
Changes:
- Register
chat.agentHost.rubberDuck.enabled(default enabled for non-stable builds) and plumb it through both Node and Electron agent-host starters viaRUBBER_DUCK_AGENT. - Add
/rubber-duckto Copilot CLI slash-command parsing and completion, with completion visibility gated byRUBBER_DUCK_AGENT. - Add tests covering parsing, completion behavior, and env var gating.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts | Adds tests for /rubber-duck parse + completion + env-gated visibility |
| src/vs/platform/agentHost/node/nodeAgentHostStarter.ts | Reads new setting and sets RUBBER_DUCK_AGENT in agent-host env |
| src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts | Adds /rubber-duck command + env-gated completion visibility |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Dispatches /rubber-duck by injecting a critic-invocation prompt |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Removes hardcoded RUBBER_DUCK_AGENT enablement |
| src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts | Adds the same setting→env wiring for the Electron utility-process starter |
| src/vs/platform/agentHost/common/agentService.ts | Introduces AgentHostRubberDuckEnabledSettingId constant |
| src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts | Registers the new configuration setting (non-stable only) |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 2
…, fix test env save/restore
…k-agent # Conflicts: # src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts # src/vs/platform/agentHost/test/common/agentHostFileSystemProvider.test.ts # src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts
connor4312
approved these changes
May 30, 2026
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.
Summary
Enables the Rubber Duck critic subagent in the Agent Host — an independent reviewer that uses a complementary model family (Claude↔GPT at the same tier) to catch bugs, logic errors, and design flaws before they ship.
https://docs.github.com/en/copilot/concepts/agents/copilot-cli/rubber-duck